Files
enaklo-flutter/lib/infrastructure/wallet/wallet_dtos.freezed.dart
T
efrilmandClaude Opus 5.5 f5e3075205 EnakPoint & EnakCoin wallet, PIN, outlet, order, community, reward
- Wallet EnakPoint & EnakCoin: beranda, riwayat, saldo kedaluwarsa, kode
  bayar, tukar EnakCoin, transfer
- PIN (buat, ganti, lupa), outlet, riwayat order, game spin
- Halaman community, webview, coming soon, dan ikon menu beranda baru
- Redesign Reward Saya: kartu tiket, filter chip, detail kode + QR
- Hapus customer point loader, menu, dan checkout lama
- Base URL ke enaklo-pos-api.altru.id

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-01 01:43:22 +07:00

5268 lines
212 KiB
Dart

// 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 'wallet_dtos.dart';
// **************************************************************************
// FreezedGenerator
// **************************************************************************
// GENERATED CODE - DO NOT MODIFY BY HAND
// dart format off
T _$identity<T>(T value) => value;
/// @nodoc
mixin _$WalletSummaryDto {
@JsonKey(name: 'point_balance') int? get pointBalance;@JsonKey(name: 'coin_balance') int? get coinBalance;@JsonKey(name: 'point_value') int? get pointValue;@JsonKey(name: 'point_discount_value') int? get pointDiscountValue;@JsonKey(name: 'nearest_expiring') NearestExpiringDto? get nearestExpiring;@JsonKey(name: 'recent_transactions') List<WalletTransactionDto>? get recentTransactions;
/// Create a copy of WalletSummaryDto
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
$WalletSummaryDtoCopyWith<WalletSummaryDto> get copyWith => _$WalletSummaryDtoCopyWithImpl<WalletSummaryDto>(this as WalletSummaryDto, _$identity);
/// Serializes this WalletSummaryDto to a JSON map.
Map<String, dynamic> toJson();
@override
bool operator ==(Object other) {
final _this = this as WalletSummaryDto;
return identical(this, other) || (other.runtimeType == runtimeType&&other is WalletSummaryDto&&(identical(other.pointBalance, _this.pointBalance) || other.pointBalance == _this.pointBalance)&&(identical(other.coinBalance, _this.coinBalance) || other.coinBalance == _this.coinBalance)&&(identical(other.pointValue, _this.pointValue) || other.pointValue == _this.pointValue)&&(identical(other.pointDiscountValue, _this.pointDiscountValue) || other.pointDiscountValue == _this.pointDiscountValue)&&(identical(other.nearestExpiring, _this.nearestExpiring) || other.nearestExpiring == _this.nearestExpiring)&&const DeepCollectionEquality().equals(other.recentTransactions, _this.recentTransactions));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode {
final _this = this as WalletSummaryDto;
return Object.hash(runtimeType,_this.pointBalance,_this.coinBalance,_this.pointValue,_this.pointDiscountValue,_this.nearestExpiring,const DeepCollectionEquality().hash(_this.recentTransactions));
}
@override
String toString() {
final _this = this as WalletSummaryDto;
return 'WalletSummaryDto(pointBalance: ${_this.pointBalance}, coinBalance: ${_this.coinBalance}, pointValue: ${_this.pointValue}, pointDiscountValue: ${_this.pointDiscountValue}, nearestExpiring: ${_this.nearestExpiring}, recentTransactions: ${_this.recentTransactions})';
}
}
/// @nodoc
abstract mixin class $WalletSummaryDtoCopyWith<$Res> {
factory $WalletSummaryDtoCopyWith(WalletSummaryDto value, $Res Function(WalletSummaryDto) _then) = _$WalletSummaryDtoCopyWithImpl;
@useResult
$Res call({
@JsonKey(name: 'point_balance') int? pointBalance,@JsonKey(name: 'coin_balance') int? coinBalance,@JsonKey(name: 'point_value') int? pointValue,@JsonKey(name: 'point_discount_value') int? pointDiscountValue,@JsonKey(name: 'nearest_expiring') NearestExpiringDto? nearestExpiring,@JsonKey(name: 'recent_transactions') List<WalletTransactionDto>? recentTransactions
});
$NearestExpiringDtoCopyWith<$Res>? get nearestExpiring;
}
/// @nodoc
class _$WalletSummaryDtoCopyWithImpl<$Res>
implements $WalletSummaryDtoCopyWith<$Res> {
_$WalletSummaryDtoCopyWithImpl(this._self, this._then);
final WalletSummaryDto _self;
final $Res Function(WalletSummaryDto) _then;
/// Create a copy of WalletSummaryDto
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @override $Res call({Object? pointBalance = freezed,Object? coinBalance = freezed,Object? pointValue = freezed,Object? pointDiscountValue = freezed,Object? nearestExpiring = freezed,Object? recentTransactions = freezed,}) {
return _then(WalletSummaryDto(
pointBalance: freezed == pointBalance ? _self.pointBalance : pointBalance // ignore: cast_nullable_to_non_nullable
as int?,coinBalance: freezed == coinBalance ? _self.coinBalance : coinBalance // ignore: cast_nullable_to_non_nullable
as int?,pointValue: freezed == pointValue ? _self.pointValue : pointValue // ignore: cast_nullable_to_non_nullable
as int?,pointDiscountValue: freezed == pointDiscountValue ? _self.pointDiscountValue : pointDiscountValue // ignore: cast_nullable_to_non_nullable
as int?,nearestExpiring: freezed == nearestExpiring ? _self.nearestExpiring : nearestExpiring // ignore: cast_nullable_to_non_nullable
as NearestExpiringDto?,recentTransactions: freezed == recentTransactions ? _self.recentTransactions : recentTransactions // ignore: cast_nullable_to_non_nullable
as List<WalletTransactionDto>?,
));
}
/// Create a copy of WalletSummaryDto
/// with the given fields replaced by the non-null parameter values.
@override
@pragma('vm:prefer-inline')
$NearestExpiringDtoCopyWith<$Res>? get nearestExpiring {
if (_self.nearestExpiring == null) {
return null;
}
return $NearestExpiringDtoCopyWith<$Res>(_self.nearestExpiring!, (value) {
return _then(_self.copyWith(nearestExpiring: value));
});
}
}
/// Adds pattern-matching-related methods to [WalletSummaryDto].
extension WalletSummaryDtoPatterns on WalletSummaryDto {
/// 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( _WalletSummaryDto value)? $default,{required TResult orElse(),}){
final _that = this;
switch (_that) {
case _WalletSummaryDto() 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( _WalletSummaryDto value) $default,){
final _that = this;
switch (_that) {
case _WalletSummaryDto():
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( _WalletSummaryDto value)? $default,){
final _that = this;
switch (_that) {
case _WalletSummaryDto() 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: 'point_balance') int? pointBalance, @JsonKey(name: 'coin_balance') int? coinBalance, @JsonKey(name: 'point_value') int? pointValue, @JsonKey(name: 'point_discount_value') int? pointDiscountValue, @JsonKey(name: 'nearest_expiring') NearestExpiringDto? nearestExpiring, @JsonKey(name: 'recent_transactions') List<WalletTransactionDto>? recentTransactions)? $default,{required TResult orElse(),}) {final _that = this;
switch (_that) {
case _WalletSummaryDto() when $default != null:
return $default(_that.pointBalance,_that.coinBalance,_that.pointValue,_that.pointDiscountValue,_that.nearestExpiring,_that.recentTransactions);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: 'point_balance') int? pointBalance, @JsonKey(name: 'coin_balance') int? coinBalance, @JsonKey(name: 'point_value') int? pointValue, @JsonKey(name: 'point_discount_value') int? pointDiscountValue, @JsonKey(name: 'nearest_expiring') NearestExpiringDto? nearestExpiring, @JsonKey(name: 'recent_transactions') List<WalletTransactionDto>? recentTransactions) $default,) {final _that = this;
switch (_that) {
case _WalletSummaryDto():
return $default(_that.pointBalance,_that.coinBalance,_that.pointValue,_that.pointDiscountValue,_that.nearestExpiring,_that.recentTransactions);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: 'point_balance') int? pointBalance, @JsonKey(name: 'coin_balance') int? coinBalance, @JsonKey(name: 'point_value') int? pointValue, @JsonKey(name: 'point_discount_value') int? pointDiscountValue, @JsonKey(name: 'nearest_expiring') NearestExpiringDto? nearestExpiring, @JsonKey(name: 'recent_transactions') List<WalletTransactionDto>? recentTransactions)? $default,) {final _that = this;
switch (_that) {
case _WalletSummaryDto() when $default != null:
return $default(_that.pointBalance,_that.coinBalance,_that.pointValue,_that.pointDiscountValue,_that.nearestExpiring,_that.recentTransactions);case _:
return null;
}
}
}
/// @nodoc
@JsonSerializable()
class _WalletSummaryDto extends WalletSummaryDto {
const _WalletSummaryDto({@JsonKey(name: 'point_balance') this.pointBalance, @JsonKey(name: 'coin_balance') this.coinBalance, @JsonKey(name: 'point_value') this.pointValue, @JsonKey(name: 'point_discount_value') this.pointDiscountValue, @JsonKey(name: 'nearest_expiring') this.nearestExpiring, @JsonKey(name: 'recent_transactions') List<WalletTransactionDto>? recentTransactions}): _recentTransactions = recentTransactions,super._();
factory _WalletSummaryDto.fromJson(Map<String, dynamic> json) => _$WalletSummaryDtoFromJson(json);
@override@JsonKey(name: 'point_balance') final int? pointBalance;
@override@JsonKey(name: 'coin_balance') final int? coinBalance;
@override@JsonKey(name: 'point_value') final int? pointValue;
@override@JsonKey(name: 'point_discount_value') final int? pointDiscountValue;
@override@JsonKey(name: 'nearest_expiring') final NearestExpiringDto? nearestExpiring;
final List<WalletTransactionDto>? _recentTransactions;
@override@JsonKey(name: 'recent_transactions') List<WalletTransactionDto>? get recentTransactions {
final value = _recentTransactions;
if (value == null) return null;
if (_recentTransactions is EqualUnmodifiableListView) return _recentTransactions;
// ignore: implicit_dynamic_type
return EqualUnmodifiableListView(value);
}
/// Create a copy of WalletSummaryDto
/// with the given fields replaced by the non-null parameter values.
@override @JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
_$WalletSummaryDtoCopyWith<_WalletSummaryDto> get copyWith => __$WalletSummaryDtoCopyWithImpl<_WalletSummaryDto>(this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$WalletSummaryDtoToJson(this, );
}
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is _WalletSummaryDto&&(identical(other.pointBalance, pointBalance) || other.pointBalance == pointBalance)&&(identical(other.coinBalance, coinBalance) || other.coinBalance == coinBalance)&&(identical(other.pointValue, pointValue) || other.pointValue == pointValue)&&(identical(other.pointDiscountValue, pointDiscountValue) || other.pointDiscountValue == pointDiscountValue)&&(identical(other.nearestExpiring, nearestExpiring) || other.nearestExpiring == nearestExpiring)&&const DeepCollectionEquality().equals(other.recentTransactions, _recentTransactions));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode {
return Object.hash(runtimeType,pointBalance,coinBalance,pointValue,pointDiscountValue,nearestExpiring,const DeepCollectionEquality().hash(_recentTransactions));
}
@override
String toString() {
return 'WalletSummaryDto(pointBalance: $pointBalance, coinBalance: $coinBalance, pointValue: $pointValue, pointDiscountValue: $pointDiscountValue, nearestExpiring: $nearestExpiring, recentTransactions: $recentTransactions)';
}
}
/// @nodoc
abstract mixin class _$WalletSummaryDtoCopyWith<$Res> implements $WalletSummaryDtoCopyWith<$Res> {
factory _$WalletSummaryDtoCopyWith(_WalletSummaryDto value, $Res Function(_WalletSummaryDto) _then) = __$WalletSummaryDtoCopyWithImpl;
@override @useResult
$Res call({
@JsonKey(name: 'point_balance') int? pointBalance,@JsonKey(name: 'coin_balance') int? coinBalance,@JsonKey(name: 'point_value') int? pointValue,@JsonKey(name: 'point_discount_value') int? pointDiscountValue,@JsonKey(name: 'nearest_expiring') NearestExpiringDto? nearestExpiring,@JsonKey(name: 'recent_transactions') List<WalletTransactionDto>? recentTransactions
});
@override $NearestExpiringDtoCopyWith<$Res>? get nearestExpiring;
}
/// @nodoc
class __$WalletSummaryDtoCopyWithImpl<$Res>
implements _$WalletSummaryDtoCopyWith<$Res> {
__$WalletSummaryDtoCopyWithImpl(this._self, this._then);
final _WalletSummaryDto _self;
final $Res Function(_WalletSummaryDto) _then;
/// Create a copy of WalletSummaryDto
/// with the given fields replaced by the non-null parameter values.
@override @pragma('vm:prefer-inline') $Res call({Object? pointBalance = freezed,Object? coinBalance = freezed,Object? pointValue = freezed,Object? pointDiscountValue = freezed,Object? nearestExpiring = freezed,Object? recentTransactions = freezed,}) {
return _then(_WalletSummaryDto(
pointBalance: freezed == pointBalance ? _self.pointBalance : pointBalance // ignore: cast_nullable_to_non_nullable
as int?,coinBalance: freezed == coinBalance ? _self.coinBalance : coinBalance // ignore: cast_nullable_to_non_nullable
as int?,pointValue: freezed == pointValue ? _self.pointValue : pointValue // ignore: cast_nullable_to_non_nullable
as int?,pointDiscountValue: freezed == pointDiscountValue ? _self.pointDiscountValue : pointDiscountValue // ignore: cast_nullable_to_non_nullable
as int?,nearestExpiring: freezed == nearestExpiring ? _self.nearestExpiring : nearestExpiring // ignore: cast_nullable_to_non_nullable
as NearestExpiringDto?,recentTransactions: freezed == recentTransactions ? _self._recentTransactions : recentTransactions // ignore: cast_nullable_to_non_nullable
as List<WalletTransactionDto>?,
));
}
/// Create a copy of WalletSummaryDto
/// with the given fields replaced by the non-null parameter values.
@override
@pragma('vm:prefer-inline')
$NearestExpiringDtoCopyWith<$Res>? get nearestExpiring {
if (_self.nearestExpiring == null) {
return null;
}
return $NearestExpiringDtoCopyWith<$Res>(_self.nearestExpiring!, (value) {
return _then(_self.copyWith(nearestExpiring: value));
});
}
}
/// @nodoc
mixin _$NearestExpiringDto {
@JsonKey(name: 'point') ExpiringAmountDto? get point;@JsonKey(name: 'coin') ExpiringAmountDto? get coin;
/// Create a copy of NearestExpiringDto
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
$NearestExpiringDtoCopyWith<NearestExpiringDto> get copyWith => _$NearestExpiringDtoCopyWithImpl<NearestExpiringDto>(this as NearestExpiringDto, _$identity);
/// Serializes this NearestExpiringDto to a JSON map.
Map<String, dynamic> toJson();
@override
bool operator ==(Object other) {
final _this = this as NearestExpiringDto;
return identical(this, other) || (other.runtimeType == runtimeType&&other is NearestExpiringDto&&(identical(other.point, _this.point) || other.point == _this.point)&&(identical(other.coin, _this.coin) || other.coin == _this.coin));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode {
final _this = this as NearestExpiringDto;
return Object.hash(runtimeType,_this.point,_this.coin);
}
@override
String toString() {
final _this = this as NearestExpiringDto;
return 'NearestExpiringDto(point: ${_this.point}, coin: ${_this.coin})';
}
}
/// @nodoc
abstract mixin class $NearestExpiringDtoCopyWith<$Res> {
factory $NearestExpiringDtoCopyWith(NearestExpiringDto value, $Res Function(NearestExpiringDto) _then) = _$NearestExpiringDtoCopyWithImpl;
@useResult
$Res call({
@JsonKey(name: 'point') ExpiringAmountDto? point,@JsonKey(name: 'coin') ExpiringAmountDto? coin
});
$ExpiringAmountDtoCopyWith<$Res>? get point;$ExpiringAmountDtoCopyWith<$Res>? get coin;
}
/// @nodoc
class _$NearestExpiringDtoCopyWithImpl<$Res>
implements $NearestExpiringDtoCopyWith<$Res> {
_$NearestExpiringDtoCopyWithImpl(this._self, this._then);
final NearestExpiringDto _self;
final $Res Function(NearestExpiringDto) _then;
/// Create a copy of NearestExpiringDto
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @override $Res call({Object? point = freezed,Object? coin = freezed,}) {
return _then(NearestExpiringDto(
point: freezed == point ? _self.point : point // ignore: cast_nullable_to_non_nullable
as ExpiringAmountDto?,coin: freezed == coin ? _self.coin : coin // ignore: cast_nullable_to_non_nullable
as ExpiringAmountDto?,
));
}
/// Create a copy of NearestExpiringDto
/// with the given fields replaced by the non-null parameter values.
@override
@pragma('vm:prefer-inline')
$ExpiringAmountDtoCopyWith<$Res>? get point {
if (_self.point == null) {
return null;
}
return $ExpiringAmountDtoCopyWith<$Res>(_self.point!, (value) {
return _then(_self.copyWith(point: value));
});
}/// Create a copy of NearestExpiringDto
/// with the given fields replaced by the non-null parameter values.
@override
@pragma('vm:prefer-inline')
$ExpiringAmountDtoCopyWith<$Res>? get coin {
if (_self.coin == null) {
return null;
}
return $ExpiringAmountDtoCopyWith<$Res>(_self.coin!, (value) {
return _then(_self.copyWith(coin: value));
});
}
}
/// Adds pattern-matching-related methods to [NearestExpiringDto].
extension NearestExpiringDtoPatterns on NearestExpiringDto {
/// 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( _NearestExpiringDto value)? $default,{required TResult orElse(),}){
final _that = this;
switch (_that) {
case _NearestExpiringDto() 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( _NearestExpiringDto value) $default,){
final _that = this;
switch (_that) {
case _NearestExpiringDto():
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( _NearestExpiringDto value)? $default,){
final _that = this;
switch (_that) {
case _NearestExpiringDto() 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: 'point') ExpiringAmountDto? point, @JsonKey(name: 'coin') ExpiringAmountDto? coin)? $default,{required TResult orElse(),}) {final _that = this;
switch (_that) {
case _NearestExpiringDto() when $default != null:
return $default(_that.point,_that.coin);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: 'point') ExpiringAmountDto? point, @JsonKey(name: 'coin') ExpiringAmountDto? coin) $default,) {final _that = this;
switch (_that) {
case _NearestExpiringDto():
return $default(_that.point,_that.coin);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: 'point') ExpiringAmountDto? point, @JsonKey(name: 'coin') ExpiringAmountDto? coin)? $default,) {final _that = this;
switch (_that) {
case _NearestExpiringDto() when $default != null:
return $default(_that.point,_that.coin);case _:
return null;
}
}
}
/// @nodoc
@JsonSerializable()
class _NearestExpiringDto implements NearestExpiringDto {
const _NearestExpiringDto({@JsonKey(name: 'point') this.point, @JsonKey(name: 'coin') this.coin});
factory _NearestExpiringDto.fromJson(Map<String, dynamic> json) => _$NearestExpiringDtoFromJson(json);
@override@JsonKey(name: 'point') final ExpiringAmountDto? point;
@override@JsonKey(name: 'coin') final ExpiringAmountDto? coin;
/// Create a copy of NearestExpiringDto
/// with the given fields replaced by the non-null parameter values.
@override @JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
_$NearestExpiringDtoCopyWith<_NearestExpiringDto> get copyWith => __$NearestExpiringDtoCopyWithImpl<_NearestExpiringDto>(this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$NearestExpiringDtoToJson(this, );
}
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is _NearestExpiringDto&&(identical(other.point, point) || other.point == point)&&(identical(other.coin, coin) || other.coin == coin));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode {
return Object.hash(runtimeType,point,coin);
}
@override
String toString() {
return 'NearestExpiringDto(point: $point, coin: $coin)';
}
}
/// @nodoc
abstract mixin class _$NearestExpiringDtoCopyWith<$Res> implements $NearestExpiringDtoCopyWith<$Res> {
factory _$NearestExpiringDtoCopyWith(_NearestExpiringDto value, $Res Function(_NearestExpiringDto) _then) = __$NearestExpiringDtoCopyWithImpl;
@override @useResult
$Res call({
@JsonKey(name: 'point') ExpiringAmountDto? point,@JsonKey(name: 'coin') ExpiringAmountDto? coin
});
@override $ExpiringAmountDtoCopyWith<$Res>? get point;@override $ExpiringAmountDtoCopyWith<$Res>? get coin;
}
/// @nodoc
class __$NearestExpiringDtoCopyWithImpl<$Res>
implements _$NearestExpiringDtoCopyWith<$Res> {
__$NearestExpiringDtoCopyWithImpl(this._self, this._then);
final _NearestExpiringDto _self;
final $Res Function(_NearestExpiringDto) _then;
/// Create a copy of NearestExpiringDto
/// with the given fields replaced by the non-null parameter values.
@override @pragma('vm:prefer-inline') $Res call({Object? point = freezed,Object? coin = freezed,}) {
return _then(_NearestExpiringDto(
point: freezed == point ? _self.point : point // ignore: cast_nullable_to_non_nullable
as ExpiringAmountDto?,coin: freezed == coin ? _self.coin : coin // ignore: cast_nullable_to_non_nullable
as ExpiringAmountDto?,
));
}
/// Create a copy of NearestExpiringDto
/// with the given fields replaced by the non-null parameter values.
@override
@pragma('vm:prefer-inline')
$ExpiringAmountDtoCopyWith<$Res>? get point {
if (_self.point == null) {
return null;
}
return $ExpiringAmountDtoCopyWith<$Res>(_self.point!, (value) {
return _then(_self.copyWith(point: value));
});
}/// Create a copy of NearestExpiringDto
/// with the given fields replaced by the non-null parameter values.
@override
@pragma('vm:prefer-inline')
$ExpiringAmountDtoCopyWith<$Res>? get coin {
if (_self.coin == null) {
return null;
}
return $ExpiringAmountDtoCopyWith<$Res>(_self.coin!, (value) {
return _then(_self.copyWith(coin: value));
});
}
}
/// @nodoc
mixin _$ExpiringAmountDto {
@JsonKey(name: 'amount') int? get amount;@JsonKey(name: 'date') String? get date;
/// Create a copy of ExpiringAmountDto
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
$ExpiringAmountDtoCopyWith<ExpiringAmountDto> get copyWith => _$ExpiringAmountDtoCopyWithImpl<ExpiringAmountDto>(this as ExpiringAmountDto, _$identity);
/// Serializes this ExpiringAmountDto to a JSON map.
Map<String, dynamic> toJson();
@override
bool operator ==(Object other) {
final _this = this as ExpiringAmountDto;
return identical(this, other) || (other.runtimeType == runtimeType&&other is ExpiringAmountDto&&(identical(other.amount, _this.amount) || other.amount == _this.amount)&&(identical(other.date, _this.date) || other.date == _this.date));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode {
final _this = this as ExpiringAmountDto;
return Object.hash(runtimeType,_this.amount,_this.date);
}
@override
String toString() {
final _this = this as ExpiringAmountDto;
return 'ExpiringAmountDto(amount: ${_this.amount}, date: ${_this.date})';
}
}
/// @nodoc
abstract mixin class $ExpiringAmountDtoCopyWith<$Res> {
factory $ExpiringAmountDtoCopyWith(ExpiringAmountDto value, $Res Function(ExpiringAmountDto) _then) = _$ExpiringAmountDtoCopyWithImpl;
@useResult
$Res call({
@JsonKey(name: 'amount') int? amount,@JsonKey(name: 'date') String? date
});
}
/// @nodoc
class _$ExpiringAmountDtoCopyWithImpl<$Res>
implements $ExpiringAmountDtoCopyWith<$Res> {
_$ExpiringAmountDtoCopyWithImpl(this._self, this._then);
final ExpiringAmountDto _self;
final $Res Function(ExpiringAmountDto) _then;
/// Create a copy of ExpiringAmountDto
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @override $Res call({Object? amount = freezed,Object? date = freezed,}) {
return _then(ExpiringAmountDto(
amount: freezed == amount ? _self.amount : amount // ignore: cast_nullable_to_non_nullable
as int?,date: freezed == date ? _self.date : date // ignore: cast_nullable_to_non_nullable
as String?,
));
}
}
/// Adds pattern-matching-related methods to [ExpiringAmountDto].
extension ExpiringAmountDtoPatterns on ExpiringAmountDto {
/// 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( _ExpiringAmountDto value)? $default,{required TResult orElse(),}){
final _that = this;
switch (_that) {
case _ExpiringAmountDto() 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( _ExpiringAmountDto value) $default,){
final _that = this;
switch (_that) {
case _ExpiringAmountDto():
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( _ExpiringAmountDto value)? $default,){
final _that = this;
switch (_that) {
case _ExpiringAmountDto() 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: 'amount') int? amount, @JsonKey(name: 'date') String? date)? $default,{required TResult orElse(),}) {final _that = this;
switch (_that) {
case _ExpiringAmountDto() when $default != null:
return $default(_that.amount,_that.date);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: 'amount') int? amount, @JsonKey(name: 'date') String? date) $default,) {final _that = this;
switch (_that) {
case _ExpiringAmountDto():
return $default(_that.amount,_that.date);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: 'amount') int? amount, @JsonKey(name: 'date') String? date)? $default,) {final _that = this;
switch (_that) {
case _ExpiringAmountDto() when $default != null:
return $default(_that.amount,_that.date);case _:
return null;
}
}
}
/// @nodoc
@JsonSerializable()
class _ExpiringAmountDto extends ExpiringAmountDto {
const _ExpiringAmountDto({@JsonKey(name: 'amount') this.amount, @JsonKey(name: 'date') this.date}): super._();
factory _ExpiringAmountDto.fromJson(Map<String, dynamic> json) => _$ExpiringAmountDtoFromJson(json);
@override@JsonKey(name: 'amount') final int? amount;
@override@JsonKey(name: 'date') final String? date;
/// Create a copy of ExpiringAmountDto
/// with the given fields replaced by the non-null parameter values.
@override @JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
_$ExpiringAmountDtoCopyWith<_ExpiringAmountDto> get copyWith => __$ExpiringAmountDtoCopyWithImpl<_ExpiringAmountDto>(this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$ExpiringAmountDtoToJson(this, );
}
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is _ExpiringAmountDto&&(identical(other.amount, amount) || other.amount == amount)&&(identical(other.date, date) || other.date == date));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode {
return Object.hash(runtimeType,amount,date);
}
@override
String toString() {
return 'ExpiringAmountDto(amount: $amount, date: $date)';
}
}
/// @nodoc
abstract mixin class _$ExpiringAmountDtoCopyWith<$Res> implements $ExpiringAmountDtoCopyWith<$Res> {
factory _$ExpiringAmountDtoCopyWith(_ExpiringAmountDto value, $Res Function(_ExpiringAmountDto) _then) = __$ExpiringAmountDtoCopyWithImpl;
@override @useResult
$Res call({
@JsonKey(name: 'amount') int? amount,@JsonKey(name: 'date') String? date
});
}
/// @nodoc
class __$ExpiringAmountDtoCopyWithImpl<$Res>
implements _$ExpiringAmountDtoCopyWith<$Res> {
__$ExpiringAmountDtoCopyWithImpl(this._self, this._then);
final _ExpiringAmountDto _self;
final $Res Function(_ExpiringAmountDto) _then;
/// Create a copy of ExpiringAmountDto
/// with the given fields replaced by the non-null parameter values.
@override @pragma('vm:prefer-inline') $Res call({Object? amount = freezed,Object? date = freezed,}) {
return _then(_ExpiringAmountDto(
amount: freezed == amount ? _self.amount : amount // ignore: cast_nullable_to_non_nullable
as int?,date: freezed == date ? _self.date : date // ignore: cast_nullable_to_non_nullable
as String?,
));
}
}
/// @nodoc
mixin _$WalletTransactionDto {
@JsonKey(name: 'id') String? get id;@JsonKey(name: 'currency') String? get currency;@JsonKey(name: 'type') String? get type;@JsonKey(name: 'amount') int? get amount;@JsonKey(name: 'balance_after') int? get balanceAfter;@JsonKey(name: 'description') String? get description;@JsonKey(name: 'group_id') String? get groupId;@JsonKey(name: 'expires_at') String? get expiresAt;@JsonKey(name: 'created_at') String? get createdAt;
/// Create a copy of WalletTransactionDto
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
$WalletTransactionDtoCopyWith<WalletTransactionDto> get copyWith => _$WalletTransactionDtoCopyWithImpl<WalletTransactionDto>(this as WalletTransactionDto, _$identity);
/// Serializes this WalletTransactionDto to a JSON map.
Map<String, dynamic> toJson();
@override
bool operator ==(Object other) {
final _this = this as WalletTransactionDto;
return identical(this, other) || (other.runtimeType == runtimeType&&other is WalletTransactionDto&&(identical(other.id, _this.id) || other.id == _this.id)&&(identical(other.currency, _this.currency) || other.currency == _this.currency)&&(identical(other.type, _this.type) || other.type == _this.type)&&(identical(other.amount, _this.amount) || other.amount == _this.amount)&&(identical(other.balanceAfter, _this.balanceAfter) || other.balanceAfter == _this.balanceAfter)&&(identical(other.description, _this.description) || other.description == _this.description)&&(identical(other.groupId, _this.groupId) || other.groupId == _this.groupId)&&(identical(other.expiresAt, _this.expiresAt) || other.expiresAt == _this.expiresAt)&&(identical(other.createdAt, _this.createdAt) || other.createdAt == _this.createdAt));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode {
final _this = this as WalletTransactionDto;
return Object.hash(runtimeType,_this.id,_this.currency,_this.type,_this.amount,_this.balanceAfter,_this.description,_this.groupId,_this.expiresAt,_this.createdAt);
}
@override
String toString() {
final _this = this as WalletTransactionDto;
return 'WalletTransactionDto(id: ${_this.id}, currency: ${_this.currency}, type: ${_this.type}, amount: ${_this.amount}, balanceAfter: ${_this.balanceAfter}, description: ${_this.description}, groupId: ${_this.groupId}, expiresAt: ${_this.expiresAt}, createdAt: ${_this.createdAt})';
}
}
/// @nodoc
abstract mixin class $WalletTransactionDtoCopyWith<$Res> {
factory $WalletTransactionDtoCopyWith(WalletTransactionDto value, $Res Function(WalletTransactionDto) _then) = _$WalletTransactionDtoCopyWithImpl;
@useResult
$Res call({
@JsonKey(name: 'id') String? id,@JsonKey(name: 'currency') String? currency,@JsonKey(name: 'type') String? type,@JsonKey(name: 'amount') int? amount,@JsonKey(name: 'balance_after') int? balanceAfter,@JsonKey(name: 'description') String? description,@JsonKey(name: 'group_id') String? groupId,@JsonKey(name: 'expires_at') String? expiresAt,@JsonKey(name: 'created_at') String? createdAt
});
}
/// @nodoc
class _$WalletTransactionDtoCopyWithImpl<$Res>
implements $WalletTransactionDtoCopyWith<$Res> {
_$WalletTransactionDtoCopyWithImpl(this._self, this._then);
final WalletTransactionDto _self;
final $Res Function(WalletTransactionDto) _then;
/// Create a copy of WalletTransactionDto
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @override $Res call({Object? id = freezed,Object? currency = freezed,Object? type = freezed,Object? amount = freezed,Object? balanceAfter = freezed,Object? description = freezed,Object? groupId = freezed,Object? expiresAt = freezed,Object? createdAt = freezed,}) {
return _then(WalletTransactionDto(
id: freezed == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
as String?,currency: freezed == currency ? _self.currency : currency // ignore: cast_nullable_to_non_nullable
as String?,type: freezed == type ? _self.type : type // ignore: cast_nullable_to_non_nullable
as String?,amount: freezed == amount ? _self.amount : amount // ignore: cast_nullable_to_non_nullable
as int?,balanceAfter: freezed == balanceAfter ? _self.balanceAfter : balanceAfter // ignore: cast_nullable_to_non_nullable
as int?,description: freezed == description ? _self.description : description // ignore: cast_nullable_to_non_nullable
as String?,groupId: freezed == groupId ? _self.groupId : groupId // ignore: cast_nullable_to_non_nullable
as String?,expiresAt: freezed == expiresAt ? _self.expiresAt : expiresAt // ignore: cast_nullable_to_non_nullable
as String?,createdAt: freezed == createdAt ? _self.createdAt : createdAt // ignore: cast_nullable_to_non_nullable
as String?,
));
}
}
/// Adds pattern-matching-related methods to [WalletTransactionDto].
extension WalletTransactionDtoPatterns on WalletTransactionDto {
/// 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( _WalletTransactionDto value)? $default,{required TResult orElse(),}){
final _that = this;
switch (_that) {
case _WalletTransactionDto() 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( _WalletTransactionDto value) $default,){
final _that = this;
switch (_that) {
case _WalletTransactionDto():
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( _WalletTransactionDto value)? $default,){
final _that = this;
switch (_that) {
case _WalletTransactionDto() 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: 'id') String? id, @JsonKey(name: 'currency') String? currency, @JsonKey(name: 'type') String? type, @JsonKey(name: 'amount') int? amount, @JsonKey(name: 'balance_after') int? balanceAfter, @JsonKey(name: 'description') String? description, @JsonKey(name: 'group_id') String? groupId, @JsonKey(name: 'expires_at') String? expiresAt, @JsonKey(name: 'created_at') String? createdAt)? $default,{required TResult orElse(),}) {final _that = this;
switch (_that) {
case _WalletTransactionDto() when $default != null:
return $default(_that.id,_that.currency,_that.type,_that.amount,_that.balanceAfter,_that.description,_that.groupId,_that.expiresAt,_that.createdAt);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: 'id') String? id, @JsonKey(name: 'currency') String? currency, @JsonKey(name: 'type') String? type, @JsonKey(name: 'amount') int? amount, @JsonKey(name: 'balance_after') int? balanceAfter, @JsonKey(name: 'description') String? description, @JsonKey(name: 'group_id') String? groupId, @JsonKey(name: 'expires_at') String? expiresAt, @JsonKey(name: 'created_at') String? createdAt) $default,) {final _that = this;
switch (_that) {
case _WalletTransactionDto():
return $default(_that.id,_that.currency,_that.type,_that.amount,_that.balanceAfter,_that.description,_that.groupId,_that.expiresAt,_that.createdAt);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: 'id') String? id, @JsonKey(name: 'currency') String? currency, @JsonKey(name: 'type') String? type, @JsonKey(name: 'amount') int? amount, @JsonKey(name: 'balance_after') int? balanceAfter, @JsonKey(name: 'description') String? description, @JsonKey(name: 'group_id') String? groupId, @JsonKey(name: 'expires_at') String? expiresAt, @JsonKey(name: 'created_at') String? createdAt)? $default,) {final _that = this;
switch (_that) {
case _WalletTransactionDto() when $default != null:
return $default(_that.id,_that.currency,_that.type,_that.amount,_that.balanceAfter,_that.description,_that.groupId,_that.expiresAt,_that.createdAt);case _:
return null;
}
}
}
/// @nodoc
@JsonSerializable()
class _WalletTransactionDto extends WalletTransactionDto {
const _WalletTransactionDto({@JsonKey(name: 'id') this.id, @JsonKey(name: 'currency') this.currency, @JsonKey(name: 'type') this.type, @JsonKey(name: 'amount') this.amount, @JsonKey(name: 'balance_after') this.balanceAfter, @JsonKey(name: 'description') this.description, @JsonKey(name: 'group_id') this.groupId, @JsonKey(name: 'expires_at') this.expiresAt, @JsonKey(name: 'created_at') this.createdAt}): super._();
factory _WalletTransactionDto.fromJson(Map<String, dynamic> json) => _$WalletTransactionDtoFromJson(json);
@override@JsonKey(name: 'id') final String? id;
@override@JsonKey(name: 'currency') final String? currency;
@override@JsonKey(name: 'type') final String? type;
@override@JsonKey(name: 'amount') final int? amount;
@override@JsonKey(name: 'balance_after') final int? balanceAfter;
@override@JsonKey(name: 'description') final String? description;
@override@JsonKey(name: 'group_id') final String? groupId;
@override@JsonKey(name: 'expires_at') final String? expiresAt;
@override@JsonKey(name: 'created_at') final String? createdAt;
/// Create a copy of WalletTransactionDto
/// with the given fields replaced by the non-null parameter values.
@override @JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
_$WalletTransactionDtoCopyWith<_WalletTransactionDto> get copyWith => __$WalletTransactionDtoCopyWithImpl<_WalletTransactionDto>(this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$WalletTransactionDtoToJson(this, );
}
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is _WalletTransactionDto&&(identical(other.id, id) || other.id == id)&&(identical(other.currency, currency) || other.currency == currency)&&(identical(other.type, type) || other.type == type)&&(identical(other.amount, amount) || other.amount == amount)&&(identical(other.balanceAfter, balanceAfter) || other.balanceAfter == balanceAfter)&&(identical(other.description, description) || other.description == description)&&(identical(other.groupId, groupId) || other.groupId == groupId)&&(identical(other.expiresAt, expiresAt) || other.expiresAt == expiresAt)&&(identical(other.createdAt, createdAt) || other.createdAt == createdAt));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode {
return Object.hash(runtimeType,id,currency,type,amount,balanceAfter,description,groupId,expiresAt,createdAt);
}
@override
String toString() {
return 'WalletTransactionDto(id: $id, currency: $currency, type: $type, amount: $amount, balanceAfter: $balanceAfter, description: $description, groupId: $groupId, expiresAt: $expiresAt, createdAt: $createdAt)';
}
}
/// @nodoc
abstract mixin class _$WalletTransactionDtoCopyWith<$Res> implements $WalletTransactionDtoCopyWith<$Res> {
factory _$WalletTransactionDtoCopyWith(_WalletTransactionDto value, $Res Function(_WalletTransactionDto) _then) = __$WalletTransactionDtoCopyWithImpl;
@override @useResult
$Res call({
@JsonKey(name: 'id') String? id,@JsonKey(name: 'currency') String? currency,@JsonKey(name: 'type') String? type,@JsonKey(name: 'amount') int? amount,@JsonKey(name: 'balance_after') int? balanceAfter,@JsonKey(name: 'description') String? description,@JsonKey(name: 'group_id') String? groupId,@JsonKey(name: 'expires_at') String? expiresAt,@JsonKey(name: 'created_at') String? createdAt
});
}
/// @nodoc
class __$WalletTransactionDtoCopyWithImpl<$Res>
implements _$WalletTransactionDtoCopyWith<$Res> {
__$WalletTransactionDtoCopyWithImpl(this._self, this._then);
final _WalletTransactionDto _self;
final $Res Function(_WalletTransactionDto) _then;
/// Create a copy of WalletTransactionDto
/// with the given fields replaced by the non-null parameter values.
@override @pragma('vm:prefer-inline') $Res call({Object? id = freezed,Object? currency = freezed,Object? type = freezed,Object? amount = freezed,Object? balanceAfter = freezed,Object? description = freezed,Object? groupId = freezed,Object? expiresAt = freezed,Object? createdAt = freezed,}) {
return _then(_WalletTransactionDto(
id: freezed == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
as String?,currency: freezed == currency ? _self.currency : currency // ignore: cast_nullable_to_non_nullable
as String?,type: freezed == type ? _self.type : type // ignore: cast_nullable_to_non_nullable
as String?,amount: freezed == amount ? _self.amount : amount // ignore: cast_nullable_to_non_nullable
as int?,balanceAfter: freezed == balanceAfter ? _self.balanceAfter : balanceAfter // ignore: cast_nullable_to_non_nullable
as int?,description: freezed == description ? _self.description : description // ignore: cast_nullable_to_non_nullable
as String?,groupId: freezed == groupId ? _self.groupId : groupId // ignore: cast_nullable_to_non_nullable
as String?,expiresAt: freezed == expiresAt ? _self.expiresAt : expiresAt // ignore: cast_nullable_to_non_nullable
as String?,createdAt: freezed == createdAt ? _self.createdAt : createdAt // ignore: cast_nullable_to_non_nullable
as String?,
));
}
}
/// @nodoc
mixin _$WalletPaginationDto {
@JsonKey(name: 'page') int? get page;@JsonKey(name: 'limit') int? get limit;@JsonKey(name: 'total_count') int? get totalCount;@JsonKey(name: 'total_pages') int? get totalPages;
/// Create a copy of WalletPaginationDto
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
$WalletPaginationDtoCopyWith<WalletPaginationDto> get copyWith => _$WalletPaginationDtoCopyWithImpl<WalletPaginationDto>(this as WalletPaginationDto, _$identity);
/// Serializes this WalletPaginationDto to a JSON map.
Map<String, dynamic> toJson();
@override
bool operator ==(Object other) {
final _this = this as WalletPaginationDto;
return identical(this, other) || (other.runtimeType == runtimeType&&other is WalletPaginationDto&&(identical(other.page, _this.page) || other.page == _this.page)&&(identical(other.limit, _this.limit) || other.limit == _this.limit)&&(identical(other.totalCount, _this.totalCount) || other.totalCount == _this.totalCount)&&(identical(other.totalPages, _this.totalPages) || other.totalPages == _this.totalPages));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode {
final _this = this as WalletPaginationDto;
return Object.hash(runtimeType,_this.page,_this.limit,_this.totalCount,_this.totalPages);
}
@override
String toString() {
final _this = this as WalletPaginationDto;
return 'WalletPaginationDto(page: ${_this.page}, limit: ${_this.limit}, totalCount: ${_this.totalCount}, totalPages: ${_this.totalPages})';
}
}
/// @nodoc
abstract mixin class $WalletPaginationDtoCopyWith<$Res> {
factory $WalletPaginationDtoCopyWith(WalletPaginationDto value, $Res Function(WalletPaginationDto) _then) = _$WalletPaginationDtoCopyWithImpl;
@useResult
$Res call({
@JsonKey(name: 'page') int? page,@JsonKey(name: 'limit') int? limit,@JsonKey(name: 'total_count') int? totalCount,@JsonKey(name: 'total_pages') int? totalPages
});
}
/// @nodoc
class _$WalletPaginationDtoCopyWithImpl<$Res>
implements $WalletPaginationDtoCopyWith<$Res> {
_$WalletPaginationDtoCopyWithImpl(this._self, this._then);
final WalletPaginationDto _self;
final $Res Function(WalletPaginationDto) _then;
/// Create a copy of WalletPaginationDto
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @override $Res call({Object? page = freezed,Object? limit = freezed,Object? totalCount = freezed,Object? totalPages = freezed,}) {
return _then(WalletPaginationDto(
page: freezed == page ? _self.page : page // ignore: cast_nullable_to_non_nullable
as int?,limit: freezed == limit ? _self.limit : limit // ignore: cast_nullable_to_non_nullable
as int?,totalCount: freezed == totalCount ? _self.totalCount : totalCount // ignore: cast_nullable_to_non_nullable
as int?,totalPages: freezed == totalPages ? _self.totalPages : totalPages // ignore: cast_nullable_to_non_nullable
as int?,
));
}
}
/// Adds pattern-matching-related methods to [WalletPaginationDto].
extension WalletPaginationDtoPatterns on WalletPaginationDto {
/// 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( _WalletPaginationDto value)? $default,{required TResult orElse(),}){
final _that = this;
switch (_that) {
case _WalletPaginationDto() 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( _WalletPaginationDto value) $default,){
final _that = this;
switch (_that) {
case _WalletPaginationDto():
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( _WalletPaginationDto value)? $default,){
final _that = this;
switch (_that) {
case _WalletPaginationDto() 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: 'page') int? page, @JsonKey(name: 'limit') int? limit, @JsonKey(name: 'total_count') int? totalCount, @JsonKey(name: 'total_pages') int? totalPages)? $default,{required TResult orElse(),}) {final _that = this;
switch (_that) {
case _WalletPaginationDto() when $default != null:
return $default(_that.page,_that.limit,_that.totalCount,_that.totalPages);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: 'page') int? page, @JsonKey(name: 'limit') int? limit, @JsonKey(name: 'total_count') int? totalCount, @JsonKey(name: 'total_pages') int? totalPages) $default,) {final _that = this;
switch (_that) {
case _WalletPaginationDto():
return $default(_that.page,_that.limit,_that.totalCount,_that.totalPages);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: 'page') int? page, @JsonKey(name: 'limit') int? limit, @JsonKey(name: 'total_count') int? totalCount, @JsonKey(name: 'total_pages') int? totalPages)? $default,) {final _that = this;
switch (_that) {
case _WalletPaginationDto() when $default != null:
return $default(_that.page,_that.limit,_that.totalCount,_that.totalPages);case _:
return null;
}
}
}
/// @nodoc
@JsonSerializable()
class _WalletPaginationDto implements WalletPaginationDto {
const _WalletPaginationDto({@JsonKey(name: 'page') this.page, @JsonKey(name: 'limit') this.limit, @JsonKey(name: 'total_count') this.totalCount, @JsonKey(name: 'total_pages') this.totalPages});
factory _WalletPaginationDto.fromJson(Map<String, dynamic> json) => _$WalletPaginationDtoFromJson(json);
@override@JsonKey(name: 'page') final int? page;
@override@JsonKey(name: 'limit') final int? limit;
@override@JsonKey(name: 'total_count') final int? totalCount;
@override@JsonKey(name: 'total_pages') final int? totalPages;
/// Create a copy of WalletPaginationDto
/// with the given fields replaced by the non-null parameter values.
@override @JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
_$WalletPaginationDtoCopyWith<_WalletPaginationDto> get copyWith => __$WalletPaginationDtoCopyWithImpl<_WalletPaginationDto>(this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$WalletPaginationDtoToJson(this, );
}
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is _WalletPaginationDto&&(identical(other.page, page) || other.page == page)&&(identical(other.limit, limit) || other.limit == limit)&&(identical(other.totalCount, totalCount) || other.totalCount == totalCount)&&(identical(other.totalPages, totalPages) || other.totalPages == totalPages));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode {
return Object.hash(runtimeType,page,limit,totalCount,totalPages);
}
@override
String toString() {
return 'WalletPaginationDto(page: $page, limit: $limit, totalCount: $totalCount, totalPages: $totalPages)';
}
}
/// @nodoc
abstract mixin class _$WalletPaginationDtoCopyWith<$Res> implements $WalletPaginationDtoCopyWith<$Res> {
factory _$WalletPaginationDtoCopyWith(_WalletPaginationDto value, $Res Function(_WalletPaginationDto) _then) = __$WalletPaginationDtoCopyWithImpl;
@override @useResult
$Res call({
@JsonKey(name: 'page') int? page,@JsonKey(name: 'limit') int? limit,@JsonKey(name: 'total_count') int? totalCount,@JsonKey(name: 'total_pages') int? totalPages
});
}
/// @nodoc
class __$WalletPaginationDtoCopyWithImpl<$Res>
implements _$WalletPaginationDtoCopyWith<$Res> {
__$WalletPaginationDtoCopyWithImpl(this._self, this._then);
final _WalletPaginationDto _self;
final $Res Function(_WalletPaginationDto) _then;
/// Create a copy of WalletPaginationDto
/// with the given fields replaced by the non-null parameter values.
@override @pragma('vm:prefer-inline') $Res call({Object? page = freezed,Object? limit = freezed,Object? totalCount = freezed,Object? totalPages = freezed,}) {
return _then(_WalletPaginationDto(
page: freezed == page ? _self.page : page // ignore: cast_nullable_to_non_nullable
as int?,limit: freezed == limit ? _self.limit : limit // ignore: cast_nullable_to_non_nullable
as int?,totalCount: freezed == totalCount ? _self.totalCount : totalCount // ignore: cast_nullable_to_non_nullable
as int?,totalPages: freezed == totalPages ? _self.totalPages : totalPages // ignore: cast_nullable_to_non_nullable
as int?,
));
}
}
/// @nodoc
mixin _$WalletExpiringDto {
@JsonKey(name: 'point') List<ExpiringAmountDto>? get point;@JsonKey(name: 'coin') List<ExpiringAmountDto>? get coin;
/// Create a copy of WalletExpiringDto
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
$WalletExpiringDtoCopyWith<WalletExpiringDto> get copyWith => _$WalletExpiringDtoCopyWithImpl<WalletExpiringDto>(this as WalletExpiringDto, _$identity);
/// Serializes this WalletExpiringDto to a JSON map.
Map<String, dynamic> toJson();
@override
bool operator ==(Object other) {
final _this = this as WalletExpiringDto;
return identical(this, other) || (other.runtimeType == runtimeType&&other is WalletExpiringDto&&const DeepCollectionEquality().equals(other.point, _this.point)&&const DeepCollectionEquality().equals(other.coin, _this.coin));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode {
final _this = this as WalletExpiringDto;
return Object.hash(runtimeType,const DeepCollectionEquality().hash(_this.point),const DeepCollectionEquality().hash(_this.coin));
}
@override
String toString() {
final _this = this as WalletExpiringDto;
return 'WalletExpiringDto(point: ${_this.point}, coin: ${_this.coin})';
}
}
/// @nodoc
abstract mixin class $WalletExpiringDtoCopyWith<$Res> {
factory $WalletExpiringDtoCopyWith(WalletExpiringDto value, $Res Function(WalletExpiringDto) _then) = _$WalletExpiringDtoCopyWithImpl;
@useResult
$Res call({
@JsonKey(name: 'point') List<ExpiringAmountDto>? point,@JsonKey(name: 'coin') List<ExpiringAmountDto>? coin
});
}
/// @nodoc
class _$WalletExpiringDtoCopyWithImpl<$Res>
implements $WalletExpiringDtoCopyWith<$Res> {
_$WalletExpiringDtoCopyWithImpl(this._self, this._then);
final WalletExpiringDto _self;
final $Res Function(WalletExpiringDto) _then;
/// Create a copy of WalletExpiringDto
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @override $Res call({Object? point = freezed,Object? coin = freezed,}) {
return _then(WalletExpiringDto(
point: freezed == point ? _self.point : point // ignore: cast_nullable_to_non_nullable
as List<ExpiringAmountDto>?,coin: freezed == coin ? _self.coin : coin // ignore: cast_nullable_to_non_nullable
as List<ExpiringAmountDto>?,
));
}
}
/// Adds pattern-matching-related methods to [WalletExpiringDto].
extension WalletExpiringDtoPatterns on WalletExpiringDto {
/// 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( _WalletExpiringDto value)? $default,{required TResult orElse(),}){
final _that = this;
switch (_that) {
case _WalletExpiringDto() 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( _WalletExpiringDto value) $default,){
final _that = this;
switch (_that) {
case _WalletExpiringDto():
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( _WalletExpiringDto value)? $default,){
final _that = this;
switch (_that) {
case _WalletExpiringDto() 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: 'point') List<ExpiringAmountDto>? point, @JsonKey(name: 'coin') List<ExpiringAmountDto>? coin)? $default,{required TResult orElse(),}) {final _that = this;
switch (_that) {
case _WalletExpiringDto() when $default != null:
return $default(_that.point,_that.coin);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: 'point') List<ExpiringAmountDto>? point, @JsonKey(name: 'coin') List<ExpiringAmountDto>? coin) $default,) {final _that = this;
switch (_that) {
case _WalletExpiringDto():
return $default(_that.point,_that.coin);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: 'point') List<ExpiringAmountDto>? point, @JsonKey(name: 'coin') List<ExpiringAmountDto>? coin)? $default,) {final _that = this;
switch (_that) {
case _WalletExpiringDto() when $default != null:
return $default(_that.point,_that.coin);case _:
return null;
}
}
}
/// @nodoc
@JsonSerializable()
class _WalletExpiringDto extends WalletExpiringDto {
const _WalletExpiringDto({@JsonKey(name: 'point') List<ExpiringAmountDto>? point, @JsonKey(name: 'coin') List<ExpiringAmountDto>? coin}): _point = point,_coin = coin,super._();
factory _WalletExpiringDto.fromJson(Map<String, dynamic> json) => _$WalletExpiringDtoFromJson(json);
final List<ExpiringAmountDto>? _point;
@override@JsonKey(name: 'point') List<ExpiringAmountDto>? get point {
final value = _point;
if (value == null) return null;
if (_point is EqualUnmodifiableListView) return _point;
// ignore: implicit_dynamic_type
return EqualUnmodifiableListView(value);
}
final List<ExpiringAmountDto>? _coin;
@override@JsonKey(name: 'coin') List<ExpiringAmountDto>? get coin {
final value = _coin;
if (value == null) return null;
if (_coin is EqualUnmodifiableListView) return _coin;
// ignore: implicit_dynamic_type
return EqualUnmodifiableListView(value);
}
/// Create a copy of WalletExpiringDto
/// with the given fields replaced by the non-null parameter values.
@override @JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
_$WalletExpiringDtoCopyWith<_WalletExpiringDto> get copyWith => __$WalletExpiringDtoCopyWithImpl<_WalletExpiringDto>(this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$WalletExpiringDtoToJson(this, );
}
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is _WalletExpiringDto&&const DeepCollectionEquality().equals(other.point, _point)&&const DeepCollectionEquality().equals(other.coin, _coin));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode {
return Object.hash(runtimeType,const DeepCollectionEquality().hash(_point),const DeepCollectionEquality().hash(_coin));
}
@override
String toString() {
return 'WalletExpiringDto(point: $point, coin: $coin)';
}
}
/// @nodoc
abstract mixin class _$WalletExpiringDtoCopyWith<$Res> implements $WalletExpiringDtoCopyWith<$Res> {
factory _$WalletExpiringDtoCopyWith(_WalletExpiringDto value, $Res Function(_WalletExpiringDto) _then) = __$WalletExpiringDtoCopyWithImpl;
@override @useResult
$Res call({
@JsonKey(name: 'point') List<ExpiringAmountDto>? point,@JsonKey(name: 'coin') List<ExpiringAmountDto>? coin
});
}
/// @nodoc
class __$WalletExpiringDtoCopyWithImpl<$Res>
implements _$WalletExpiringDtoCopyWith<$Res> {
__$WalletExpiringDtoCopyWithImpl(this._self, this._then);
final _WalletExpiringDto _self;
final $Res Function(_WalletExpiringDto) _then;
/// Create a copy of WalletExpiringDto
/// with the given fields replaced by the non-null parameter values.
@override @pragma('vm:prefer-inline') $Res call({Object? point = freezed,Object? coin = freezed,}) {
return _then(_WalletExpiringDto(
point: freezed == point ? _self._point : point // ignore: cast_nullable_to_non_nullable
as List<ExpiringAmountDto>?,coin: freezed == coin ? _self._coin : coin // ignore: cast_nullable_to_non_nullable
as List<ExpiringAmountDto>?,
));
}
}
/// @nodoc
mixin _$PaymentCodeDto {
@JsonKey(name: 'code') String? get code;@JsonKey(name: 'qr_payload') String? get qrPayload;@JsonKey(name: 'expires_at') String? get expiresAt;
/// Create a copy of PaymentCodeDto
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
$PaymentCodeDtoCopyWith<PaymentCodeDto> get copyWith => _$PaymentCodeDtoCopyWithImpl<PaymentCodeDto>(this as PaymentCodeDto, _$identity);
/// Serializes this PaymentCodeDto to a JSON map.
Map<String, dynamic> toJson();
@override
bool operator ==(Object other) {
final _this = this as PaymentCodeDto;
return identical(this, other) || (other.runtimeType == runtimeType&&other is PaymentCodeDto&&(identical(other.code, _this.code) || other.code == _this.code)&&(identical(other.qrPayload, _this.qrPayload) || other.qrPayload == _this.qrPayload)&&(identical(other.expiresAt, _this.expiresAt) || other.expiresAt == _this.expiresAt));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode {
final _this = this as PaymentCodeDto;
return Object.hash(runtimeType,_this.code,_this.qrPayload,_this.expiresAt);
}
@override
String toString() {
final _this = this as PaymentCodeDto;
return 'PaymentCodeDto(code: ${_this.code}, qrPayload: ${_this.qrPayload}, expiresAt: ${_this.expiresAt})';
}
}
/// @nodoc
abstract mixin class $PaymentCodeDtoCopyWith<$Res> {
factory $PaymentCodeDtoCopyWith(PaymentCodeDto value, $Res Function(PaymentCodeDto) _then) = _$PaymentCodeDtoCopyWithImpl;
@useResult
$Res call({
@JsonKey(name: 'code') String? code,@JsonKey(name: 'qr_payload') String? qrPayload,@JsonKey(name: 'expires_at') String? expiresAt
});
}
/// @nodoc
class _$PaymentCodeDtoCopyWithImpl<$Res>
implements $PaymentCodeDtoCopyWith<$Res> {
_$PaymentCodeDtoCopyWithImpl(this._self, this._then);
final PaymentCodeDto _self;
final $Res Function(PaymentCodeDto) _then;
/// Create a copy of PaymentCodeDto
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @override $Res call({Object? code = freezed,Object? qrPayload = freezed,Object? expiresAt = freezed,}) {
return _then(PaymentCodeDto(
code: freezed == code ? _self.code : code // ignore: cast_nullable_to_non_nullable
as String?,qrPayload: freezed == qrPayload ? _self.qrPayload : qrPayload // ignore: cast_nullable_to_non_nullable
as String?,expiresAt: freezed == expiresAt ? _self.expiresAt : expiresAt // ignore: cast_nullable_to_non_nullable
as String?,
));
}
}
/// Adds pattern-matching-related methods to [PaymentCodeDto].
extension PaymentCodeDtoPatterns on PaymentCodeDto {
/// 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( _PaymentCodeDto value)? $default,{required TResult orElse(),}){
final _that = this;
switch (_that) {
case _PaymentCodeDto() 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( _PaymentCodeDto value) $default,){
final _that = this;
switch (_that) {
case _PaymentCodeDto():
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( _PaymentCodeDto value)? $default,){
final _that = this;
switch (_that) {
case _PaymentCodeDto() 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: 'code') String? code, @JsonKey(name: 'qr_payload') String? qrPayload, @JsonKey(name: 'expires_at') String? expiresAt)? $default,{required TResult orElse(),}) {final _that = this;
switch (_that) {
case _PaymentCodeDto() when $default != null:
return $default(_that.code,_that.qrPayload,_that.expiresAt);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: 'code') String? code, @JsonKey(name: 'qr_payload') String? qrPayload, @JsonKey(name: 'expires_at') String? expiresAt) $default,) {final _that = this;
switch (_that) {
case _PaymentCodeDto():
return $default(_that.code,_that.qrPayload,_that.expiresAt);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: 'code') String? code, @JsonKey(name: 'qr_payload') String? qrPayload, @JsonKey(name: 'expires_at') String? expiresAt)? $default,) {final _that = this;
switch (_that) {
case _PaymentCodeDto() when $default != null:
return $default(_that.code,_that.qrPayload,_that.expiresAt);case _:
return null;
}
}
}
/// @nodoc
@JsonSerializable()
class _PaymentCodeDto extends PaymentCodeDto {
const _PaymentCodeDto({@JsonKey(name: 'code') this.code, @JsonKey(name: 'qr_payload') this.qrPayload, @JsonKey(name: 'expires_at') this.expiresAt}): super._();
factory _PaymentCodeDto.fromJson(Map<String, dynamic> json) => _$PaymentCodeDtoFromJson(json);
@override@JsonKey(name: 'code') final String? code;
@override@JsonKey(name: 'qr_payload') final String? qrPayload;
@override@JsonKey(name: 'expires_at') final String? expiresAt;
/// Create a copy of PaymentCodeDto
/// with the given fields replaced by the non-null parameter values.
@override @JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
_$PaymentCodeDtoCopyWith<_PaymentCodeDto> get copyWith => __$PaymentCodeDtoCopyWithImpl<_PaymentCodeDto>(this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$PaymentCodeDtoToJson(this, );
}
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is _PaymentCodeDto&&(identical(other.code, code) || other.code == code)&&(identical(other.qrPayload, qrPayload) || other.qrPayload == qrPayload)&&(identical(other.expiresAt, expiresAt) || other.expiresAt == expiresAt));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode {
return Object.hash(runtimeType,code,qrPayload,expiresAt);
}
@override
String toString() {
return 'PaymentCodeDto(code: $code, qrPayload: $qrPayload, expiresAt: $expiresAt)';
}
}
/// @nodoc
abstract mixin class _$PaymentCodeDtoCopyWith<$Res> implements $PaymentCodeDtoCopyWith<$Res> {
factory _$PaymentCodeDtoCopyWith(_PaymentCodeDto value, $Res Function(_PaymentCodeDto) _then) = __$PaymentCodeDtoCopyWithImpl;
@override @useResult
$Res call({
@JsonKey(name: 'code') String? code,@JsonKey(name: 'qr_payload') String? qrPayload,@JsonKey(name: 'expires_at') String? expiresAt
});
}
/// @nodoc
class __$PaymentCodeDtoCopyWithImpl<$Res>
implements _$PaymentCodeDtoCopyWith<$Res> {
__$PaymentCodeDtoCopyWithImpl(this._self, this._then);
final _PaymentCodeDto _self;
final $Res Function(_PaymentCodeDto) _then;
/// Create a copy of PaymentCodeDto
/// with the given fields replaced by the non-null parameter values.
@override @pragma('vm:prefer-inline') $Res call({Object? code = freezed,Object? qrPayload = freezed,Object? expiresAt = freezed,}) {
return _then(_PaymentCodeDto(
code: freezed == code ? _self.code : code // ignore: cast_nullable_to_non_nullable
as String?,qrPayload: freezed == qrPayload ? _self.qrPayload : qrPayload // ignore: cast_nullable_to_non_nullable
as String?,expiresAt: freezed == expiresAt ? _self.expiresAt : expiresAt // ignore: cast_nullable_to_non_nullable
as String?,
));
}
}
/// @nodoc
mixin _$ExchangePreviewDto {
@JsonKey(name: 'coin_amount') int? get coinAmount;@JsonKey(name: 'point_amount') int? get pointAmount;@JsonKey(name: 'coin_balance') int? get coinBalance;@JsonKey(name: 'coins') int? get coins;@JsonKey(name: 'points') int? get points;@JsonKey(name: 'valid') bool? get valid;@JsonKey(name: 'reason') String? get reason;
/// Create a copy of ExchangePreviewDto
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
$ExchangePreviewDtoCopyWith<ExchangePreviewDto> get copyWith => _$ExchangePreviewDtoCopyWithImpl<ExchangePreviewDto>(this as ExchangePreviewDto, _$identity);
/// Serializes this ExchangePreviewDto to a JSON map.
Map<String, dynamic> toJson();
@override
bool operator ==(Object other) {
final _this = this as ExchangePreviewDto;
return identical(this, other) || (other.runtimeType == runtimeType&&other is ExchangePreviewDto&&(identical(other.coinAmount, _this.coinAmount) || other.coinAmount == _this.coinAmount)&&(identical(other.pointAmount, _this.pointAmount) || other.pointAmount == _this.pointAmount)&&(identical(other.coinBalance, _this.coinBalance) || other.coinBalance == _this.coinBalance)&&(identical(other.coins, _this.coins) || other.coins == _this.coins)&&(identical(other.points, _this.points) || other.points == _this.points)&&(identical(other.valid, _this.valid) || other.valid == _this.valid)&&(identical(other.reason, _this.reason) || other.reason == _this.reason));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode {
final _this = this as ExchangePreviewDto;
return Object.hash(runtimeType,_this.coinAmount,_this.pointAmount,_this.coinBalance,_this.coins,_this.points,_this.valid,_this.reason);
}
@override
String toString() {
final _this = this as ExchangePreviewDto;
return 'ExchangePreviewDto(coinAmount: ${_this.coinAmount}, pointAmount: ${_this.pointAmount}, coinBalance: ${_this.coinBalance}, coins: ${_this.coins}, points: ${_this.points}, valid: ${_this.valid}, reason: ${_this.reason})';
}
}
/// @nodoc
abstract mixin class $ExchangePreviewDtoCopyWith<$Res> {
factory $ExchangePreviewDtoCopyWith(ExchangePreviewDto value, $Res Function(ExchangePreviewDto) _then) = _$ExchangePreviewDtoCopyWithImpl;
@useResult
$Res call({
@JsonKey(name: 'coin_amount') int? coinAmount,@JsonKey(name: 'point_amount') int? pointAmount,@JsonKey(name: 'coin_balance') int? coinBalance,@JsonKey(name: 'coins') int? coins,@JsonKey(name: 'points') int? points,@JsonKey(name: 'valid') bool? valid,@JsonKey(name: 'reason') String? reason
});
}
/// @nodoc
class _$ExchangePreviewDtoCopyWithImpl<$Res>
implements $ExchangePreviewDtoCopyWith<$Res> {
_$ExchangePreviewDtoCopyWithImpl(this._self, this._then);
final ExchangePreviewDto _self;
final $Res Function(ExchangePreviewDto) _then;
/// Create a copy of ExchangePreviewDto
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @override $Res call({Object? coinAmount = freezed,Object? pointAmount = freezed,Object? coinBalance = freezed,Object? coins = freezed,Object? points = freezed,Object? valid = freezed,Object? reason = freezed,}) {
return _then(ExchangePreviewDto(
coinAmount: freezed == coinAmount ? _self.coinAmount : coinAmount // ignore: cast_nullable_to_non_nullable
as int?,pointAmount: freezed == pointAmount ? _self.pointAmount : pointAmount // ignore: cast_nullable_to_non_nullable
as int?,coinBalance: freezed == coinBalance ? _self.coinBalance : coinBalance // ignore: cast_nullable_to_non_nullable
as int?,coins: freezed == coins ? _self.coins : coins // ignore: cast_nullable_to_non_nullable
as int?,points: freezed == points ? _self.points : points // ignore: cast_nullable_to_non_nullable
as int?,valid: freezed == valid ? _self.valid : valid // ignore: cast_nullable_to_non_nullable
as bool?,reason: freezed == reason ? _self.reason : reason // ignore: cast_nullable_to_non_nullable
as String?,
));
}
}
/// Adds pattern-matching-related methods to [ExchangePreviewDto].
extension ExchangePreviewDtoPatterns on ExchangePreviewDto {
/// 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( _ExchangePreviewDto value)? $default,{required TResult orElse(),}){
final _that = this;
switch (_that) {
case _ExchangePreviewDto() 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( _ExchangePreviewDto value) $default,){
final _that = this;
switch (_that) {
case _ExchangePreviewDto():
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( _ExchangePreviewDto value)? $default,){
final _that = this;
switch (_that) {
case _ExchangePreviewDto() 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: 'coin_amount') int? coinAmount, @JsonKey(name: 'point_amount') int? pointAmount, @JsonKey(name: 'coin_balance') int? coinBalance, @JsonKey(name: 'coins') int? coins, @JsonKey(name: 'points') int? points, @JsonKey(name: 'valid') bool? valid, @JsonKey(name: 'reason') String? reason)? $default,{required TResult orElse(),}) {final _that = this;
switch (_that) {
case _ExchangePreviewDto() when $default != null:
return $default(_that.coinAmount,_that.pointAmount,_that.coinBalance,_that.coins,_that.points,_that.valid,_that.reason);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: 'coin_amount') int? coinAmount, @JsonKey(name: 'point_amount') int? pointAmount, @JsonKey(name: 'coin_balance') int? coinBalance, @JsonKey(name: 'coins') int? coins, @JsonKey(name: 'points') int? points, @JsonKey(name: 'valid') bool? valid, @JsonKey(name: 'reason') String? reason) $default,) {final _that = this;
switch (_that) {
case _ExchangePreviewDto():
return $default(_that.coinAmount,_that.pointAmount,_that.coinBalance,_that.coins,_that.points,_that.valid,_that.reason);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: 'coin_amount') int? coinAmount, @JsonKey(name: 'point_amount') int? pointAmount, @JsonKey(name: 'coin_balance') int? coinBalance, @JsonKey(name: 'coins') int? coins, @JsonKey(name: 'points') int? points, @JsonKey(name: 'valid') bool? valid, @JsonKey(name: 'reason') String? reason)? $default,) {final _that = this;
switch (_that) {
case _ExchangePreviewDto() when $default != null:
return $default(_that.coinAmount,_that.pointAmount,_that.coinBalance,_that.coins,_that.points,_that.valid,_that.reason);case _:
return null;
}
}
}
/// @nodoc
@JsonSerializable()
class _ExchangePreviewDto extends ExchangePreviewDto {
const _ExchangePreviewDto({@JsonKey(name: 'coin_amount') this.coinAmount, @JsonKey(name: 'point_amount') this.pointAmount, @JsonKey(name: 'coin_balance') this.coinBalance, @JsonKey(name: 'coins') this.coins, @JsonKey(name: 'points') this.points, @JsonKey(name: 'valid') this.valid, @JsonKey(name: 'reason') this.reason}): super._();
factory _ExchangePreviewDto.fromJson(Map<String, dynamic> json) => _$ExchangePreviewDtoFromJson(json);
@override@JsonKey(name: 'coin_amount') final int? coinAmount;
@override@JsonKey(name: 'point_amount') final int? pointAmount;
@override@JsonKey(name: 'coin_balance') final int? coinBalance;
@override@JsonKey(name: 'coins') final int? coins;
@override@JsonKey(name: 'points') final int? points;
@override@JsonKey(name: 'valid') final bool? valid;
@override@JsonKey(name: 'reason') final String? reason;
/// Create a copy of ExchangePreviewDto
/// with the given fields replaced by the non-null parameter values.
@override @JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
_$ExchangePreviewDtoCopyWith<_ExchangePreviewDto> get copyWith => __$ExchangePreviewDtoCopyWithImpl<_ExchangePreviewDto>(this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$ExchangePreviewDtoToJson(this, );
}
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is _ExchangePreviewDto&&(identical(other.coinAmount, coinAmount) || other.coinAmount == coinAmount)&&(identical(other.pointAmount, pointAmount) || other.pointAmount == pointAmount)&&(identical(other.coinBalance, coinBalance) || other.coinBalance == coinBalance)&&(identical(other.coins, coins) || other.coins == coins)&&(identical(other.points, points) || other.points == points)&&(identical(other.valid, valid) || other.valid == valid)&&(identical(other.reason, reason) || other.reason == reason));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode {
return Object.hash(runtimeType,coinAmount,pointAmount,coinBalance,coins,points,valid,reason);
}
@override
String toString() {
return 'ExchangePreviewDto(coinAmount: $coinAmount, pointAmount: $pointAmount, coinBalance: $coinBalance, coins: $coins, points: $points, valid: $valid, reason: $reason)';
}
}
/// @nodoc
abstract mixin class _$ExchangePreviewDtoCopyWith<$Res> implements $ExchangePreviewDtoCopyWith<$Res> {
factory _$ExchangePreviewDtoCopyWith(_ExchangePreviewDto value, $Res Function(_ExchangePreviewDto) _then) = __$ExchangePreviewDtoCopyWithImpl;
@override @useResult
$Res call({
@JsonKey(name: 'coin_amount') int? coinAmount,@JsonKey(name: 'point_amount') int? pointAmount,@JsonKey(name: 'coin_balance') int? coinBalance,@JsonKey(name: 'coins') int? coins,@JsonKey(name: 'points') int? points,@JsonKey(name: 'valid') bool? valid,@JsonKey(name: 'reason') String? reason
});
}
/// @nodoc
class __$ExchangePreviewDtoCopyWithImpl<$Res>
implements _$ExchangePreviewDtoCopyWith<$Res> {
__$ExchangePreviewDtoCopyWithImpl(this._self, this._then);
final _ExchangePreviewDto _self;
final $Res Function(_ExchangePreviewDto) _then;
/// Create a copy of ExchangePreviewDto
/// with the given fields replaced by the non-null parameter values.
@override @pragma('vm:prefer-inline') $Res call({Object? coinAmount = freezed,Object? pointAmount = freezed,Object? coinBalance = freezed,Object? coins = freezed,Object? points = freezed,Object? valid = freezed,Object? reason = freezed,}) {
return _then(_ExchangePreviewDto(
coinAmount: freezed == coinAmount ? _self.coinAmount : coinAmount // ignore: cast_nullable_to_non_nullable
as int?,pointAmount: freezed == pointAmount ? _self.pointAmount : pointAmount // ignore: cast_nullable_to_non_nullable
as int?,coinBalance: freezed == coinBalance ? _self.coinBalance : coinBalance // ignore: cast_nullable_to_non_nullable
as int?,coins: freezed == coins ? _self.coins : coins // ignore: cast_nullable_to_non_nullable
as int?,points: freezed == points ? _self.points : points // ignore: cast_nullable_to_non_nullable
as int?,valid: freezed == valid ? _self.valid : valid // ignore: cast_nullable_to_non_nullable
as bool?,reason: freezed == reason ? _self.reason : reason // ignore: cast_nullable_to_non_nullable
as String?,
));
}
}
/// @nodoc
mixin _$ExchangeResultDto {
@JsonKey(name: 'coins') int? get coins;@JsonKey(name: 'points') int? get points;@JsonKey(name: 'coin_balance') int? get coinBalance;@JsonKey(name: 'point_balance') int? get pointBalance;@JsonKey(name: 'lots') List<WalletLotDto>? get lots;@JsonKey(name: 'replayed') bool? get replayed;
/// Create a copy of ExchangeResultDto
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
$ExchangeResultDtoCopyWith<ExchangeResultDto> get copyWith => _$ExchangeResultDtoCopyWithImpl<ExchangeResultDto>(this as ExchangeResultDto, _$identity);
/// Serializes this ExchangeResultDto to a JSON map.
Map<String, dynamic> toJson();
@override
bool operator ==(Object other) {
final _this = this as ExchangeResultDto;
return identical(this, other) || (other.runtimeType == runtimeType&&other is ExchangeResultDto&&(identical(other.coins, _this.coins) || other.coins == _this.coins)&&(identical(other.points, _this.points) || other.points == _this.points)&&(identical(other.coinBalance, _this.coinBalance) || other.coinBalance == _this.coinBalance)&&(identical(other.pointBalance, _this.pointBalance) || other.pointBalance == _this.pointBalance)&&const DeepCollectionEquality().equals(other.lots, _this.lots)&&(identical(other.replayed, _this.replayed) || other.replayed == _this.replayed));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode {
final _this = this as ExchangeResultDto;
return Object.hash(runtimeType,_this.coins,_this.points,_this.coinBalance,_this.pointBalance,const DeepCollectionEquality().hash(_this.lots),_this.replayed);
}
@override
String toString() {
final _this = this as ExchangeResultDto;
return 'ExchangeResultDto(coins: ${_this.coins}, points: ${_this.points}, coinBalance: ${_this.coinBalance}, pointBalance: ${_this.pointBalance}, lots: ${_this.lots}, replayed: ${_this.replayed})';
}
}
/// @nodoc
abstract mixin class $ExchangeResultDtoCopyWith<$Res> {
factory $ExchangeResultDtoCopyWith(ExchangeResultDto value, $Res Function(ExchangeResultDto) _then) = _$ExchangeResultDtoCopyWithImpl;
@useResult
$Res call({
@JsonKey(name: 'coins') int? coins,@JsonKey(name: 'points') int? points,@JsonKey(name: 'coin_balance') int? coinBalance,@JsonKey(name: 'point_balance') int? pointBalance,@JsonKey(name: 'lots') List<WalletLotDto>? lots,@JsonKey(name: 'replayed') bool? replayed
});
}
/// @nodoc
class _$ExchangeResultDtoCopyWithImpl<$Res>
implements $ExchangeResultDtoCopyWith<$Res> {
_$ExchangeResultDtoCopyWithImpl(this._self, this._then);
final ExchangeResultDto _self;
final $Res Function(ExchangeResultDto) _then;
/// Create a copy of ExchangeResultDto
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @override $Res call({Object? coins = freezed,Object? points = freezed,Object? coinBalance = freezed,Object? pointBalance = freezed,Object? lots = freezed,Object? replayed = freezed,}) {
return _then(ExchangeResultDto(
coins: freezed == coins ? _self.coins : coins // ignore: cast_nullable_to_non_nullable
as int?,points: freezed == points ? _self.points : points // ignore: cast_nullable_to_non_nullable
as int?,coinBalance: freezed == coinBalance ? _self.coinBalance : coinBalance // ignore: cast_nullable_to_non_nullable
as int?,pointBalance: freezed == pointBalance ? _self.pointBalance : pointBalance // ignore: cast_nullable_to_non_nullable
as int?,lots: freezed == lots ? _self.lots : lots // ignore: cast_nullable_to_non_nullable
as List<WalletLotDto>?,replayed: freezed == replayed ? _self.replayed : replayed // ignore: cast_nullable_to_non_nullable
as bool?,
));
}
}
/// Adds pattern-matching-related methods to [ExchangeResultDto].
extension ExchangeResultDtoPatterns on ExchangeResultDto {
/// 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( _ExchangeResultDto value)? $default,{required TResult orElse(),}){
final _that = this;
switch (_that) {
case _ExchangeResultDto() 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( _ExchangeResultDto value) $default,){
final _that = this;
switch (_that) {
case _ExchangeResultDto():
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( _ExchangeResultDto value)? $default,){
final _that = this;
switch (_that) {
case _ExchangeResultDto() 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: 'coins') int? coins, @JsonKey(name: 'points') int? points, @JsonKey(name: 'coin_balance') int? coinBalance, @JsonKey(name: 'point_balance') int? pointBalance, @JsonKey(name: 'lots') List<WalletLotDto>? lots, @JsonKey(name: 'replayed') bool? replayed)? $default,{required TResult orElse(),}) {final _that = this;
switch (_that) {
case _ExchangeResultDto() when $default != null:
return $default(_that.coins,_that.points,_that.coinBalance,_that.pointBalance,_that.lots,_that.replayed);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: 'coins') int? coins, @JsonKey(name: 'points') int? points, @JsonKey(name: 'coin_balance') int? coinBalance, @JsonKey(name: 'point_balance') int? pointBalance, @JsonKey(name: 'lots') List<WalletLotDto>? lots, @JsonKey(name: 'replayed') bool? replayed) $default,) {final _that = this;
switch (_that) {
case _ExchangeResultDto():
return $default(_that.coins,_that.points,_that.coinBalance,_that.pointBalance,_that.lots,_that.replayed);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: 'coins') int? coins, @JsonKey(name: 'points') int? points, @JsonKey(name: 'coin_balance') int? coinBalance, @JsonKey(name: 'point_balance') int? pointBalance, @JsonKey(name: 'lots') List<WalletLotDto>? lots, @JsonKey(name: 'replayed') bool? replayed)? $default,) {final _that = this;
switch (_that) {
case _ExchangeResultDto() when $default != null:
return $default(_that.coins,_that.points,_that.coinBalance,_that.pointBalance,_that.lots,_that.replayed);case _:
return null;
}
}
}
/// @nodoc
@JsonSerializable()
class _ExchangeResultDto extends ExchangeResultDto {
const _ExchangeResultDto({@JsonKey(name: 'coins') this.coins, @JsonKey(name: 'points') this.points, @JsonKey(name: 'coin_balance') this.coinBalance, @JsonKey(name: 'point_balance') this.pointBalance, @JsonKey(name: 'lots') List<WalletLotDto>? lots, @JsonKey(name: 'replayed') this.replayed}): _lots = lots,super._();
factory _ExchangeResultDto.fromJson(Map<String, dynamic> json) => _$ExchangeResultDtoFromJson(json);
@override@JsonKey(name: 'coins') final int? coins;
@override@JsonKey(name: 'points') final int? points;
@override@JsonKey(name: 'coin_balance') final int? coinBalance;
@override@JsonKey(name: 'point_balance') final int? pointBalance;
final List<WalletLotDto>? _lots;
@override@JsonKey(name: 'lots') List<WalletLotDto>? get lots {
final value = _lots;
if (value == null) return null;
if (_lots is EqualUnmodifiableListView) return _lots;
// ignore: implicit_dynamic_type
return EqualUnmodifiableListView(value);
}
@override@JsonKey(name: 'replayed') final bool? replayed;
/// Create a copy of ExchangeResultDto
/// with the given fields replaced by the non-null parameter values.
@override @JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
_$ExchangeResultDtoCopyWith<_ExchangeResultDto> get copyWith => __$ExchangeResultDtoCopyWithImpl<_ExchangeResultDto>(this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$ExchangeResultDtoToJson(this, );
}
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is _ExchangeResultDto&&(identical(other.coins, coins) || other.coins == coins)&&(identical(other.points, points) || other.points == points)&&(identical(other.coinBalance, coinBalance) || other.coinBalance == coinBalance)&&(identical(other.pointBalance, pointBalance) || other.pointBalance == pointBalance)&&const DeepCollectionEquality().equals(other.lots, _lots)&&(identical(other.replayed, replayed) || other.replayed == replayed));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode {
return Object.hash(runtimeType,coins,points,coinBalance,pointBalance,const DeepCollectionEquality().hash(_lots),replayed);
}
@override
String toString() {
return 'ExchangeResultDto(coins: $coins, points: $points, coinBalance: $coinBalance, pointBalance: $pointBalance, lots: $lots, replayed: $replayed)';
}
}
/// @nodoc
abstract mixin class _$ExchangeResultDtoCopyWith<$Res> implements $ExchangeResultDtoCopyWith<$Res> {
factory _$ExchangeResultDtoCopyWith(_ExchangeResultDto value, $Res Function(_ExchangeResultDto) _then) = __$ExchangeResultDtoCopyWithImpl;
@override @useResult
$Res call({
@JsonKey(name: 'coins') int? coins,@JsonKey(name: 'points') int? points,@JsonKey(name: 'coin_balance') int? coinBalance,@JsonKey(name: 'point_balance') int? pointBalance,@JsonKey(name: 'lots') List<WalletLotDto>? lots,@JsonKey(name: 'replayed') bool? replayed
});
}
/// @nodoc
class __$ExchangeResultDtoCopyWithImpl<$Res>
implements _$ExchangeResultDtoCopyWith<$Res> {
__$ExchangeResultDtoCopyWithImpl(this._self, this._then);
final _ExchangeResultDto _self;
final $Res Function(_ExchangeResultDto) _then;
/// Create a copy of ExchangeResultDto
/// with the given fields replaced by the non-null parameter values.
@override @pragma('vm:prefer-inline') $Res call({Object? coins = freezed,Object? points = freezed,Object? coinBalance = freezed,Object? pointBalance = freezed,Object? lots = freezed,Object? replayed = freezed,}) {
return _then(_ExchangeResultDto(
coins: freezed == coins ? _self.coins : coins // ignore: cast_nullable_to_non_nullable
as int?,points: freezed == points ? _self.points : points // ignore: cast_nullable_to_non_nullable
as int?,coinBalance: freezed == coinBalance ? _self.coinBalance : coinBalance // ignore: cast_nullable_to_non_nullable
as int?,pointBalance: freezed == pointBalance ? _self.pointBalance : pointBalance // ignore: cast_nullable_to_non_nullable
as int?,lots: freezed == lots ? _self._lots : lots // ignore: cast_nullable_to_non_nullable
as List<WalletLotDto>?,replayed: freezed == replayed ? _self.replayed : replayed // ignore: cast_nullable_to_non_nullable
as bool?,
));
}
}
/// @nodoc
mixin _$WalletLotDto {
@JsonKey(name: 'amount') int? get amount;@JsonKey(name: 'expires_at') String? get expiresAt;
/// Create a copy of WalletLotDto
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
$WalletLotDtoCopyWith<WalletLotDto> get copyWith => _$WalletLotDtoCopyWithImpl<WalletLotDto>(this as WalletLotDto, _$identity);
/// Serializes this WalletLotDto to a JSON map.
Map<String, dynamic> toJson();
@override
bool operator ==(Object other) {
final _this = this as WalletLotDto;
return identical(this, other) || (other.runtimeType == runtimeType&&other is WalletLotDto&&(identical(other.amount, _this.amount) || other.amount == _this.amount)&&(identical(other.expiresAt, _this.expiresAt) || other.expiresAt == _this.expiresAt));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode {
final _this = this as WalletLotDto;
return Object.hash(runtimeType,_this.amount,_this.expiresAt);
}
@override
String toString() {
final _this = this as WalletLotDto;
return 'WalletLotDto(amount: ${_this.amount}, expiresAt: ${_this.expiresAt})';
}
}
/// @nodoc
abstract mixin class $WalletLotDtoCopyWith<$Res> {
factory $WalletLotDtoCopyWith(WalletLotDto value, $Res Function(WalletLotDto) _then) = _$WalletLotDtoCopyWithImpl;
@useResult
$Res call({
@JsonKey(name: 'amount') int? amount,@JsonKey(name: 'expires_at') String? expiresAt
});
}
/// @nodoc
class _$WalletLotDtoCopyWithImpl<$Res>
implements $WalletLotDtoCopyWith<$Res> {
_$WalletLotDtoCopyWithImpl(this._self, this._then);
final WalletLotDto _self;
final $Res Function(WalletLotDto) _then;
/// Create a copy of WalletLotDto
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @override $Res call({Object? amount = freezed,Object? expiresAt = freezed,}) {
return _then(WalletLotDto(
amount: freezed == amount ? _self.amount : amount // ignore: cast_nullable_to_non_nullable
as int?,expiresAt: freezed == expiresAt ? _self.expiresAt : expiresAt // ignore: cast_nullable_to_non_nullable
as String?,
));
}
}
/// Adds pattern-matching-related methods to [WalletLotDto].
extension WalletLotDtoPatterns on WalletLotDto {
/// 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( _WalletLotDto value)? $default,{required TResult orElse(),}){
final _that = this;
switch (_that) {
case _WalletLotDto() 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( _WalletLotDto value) $default,){
final _that = this;
switch (_that) {
case _WalletLotDto():
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( _WalletLotDto value)? $default,){
final _that = this;
switch (_that) {
case _WalletLotDto() 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: 'amount') int? amount, @JsonKey(name: 'expires_at') String? expiresAt)? $default,{required TResult orElse(),}) {final _that = this;
switch (_that) {
case _WalletLotDto() when $default != null:
return $default(_that.amount,_that.expiresAt);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: 'amount') int? amount, @JsonKey(name: 'expires_at') String? expiresAt) $default,) {final _that = this;
switch (_that) {
case _WalletLotDto():
return $default(_that.amount,_that.expiresAt);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: 'amount') int? amount, @JsonKey(name: 'expires_at') String? expiresAt)? $default,) {final _that = this;
switch (_that) {
case _WalletLotDto() when $default != null:
return $default(_that.amount,_that.expiresAt);case _:
return null;
}
}
}
/// @nodoc
@JsonSerializable()
class _WalletLotDto extends WalletLotDto {
const _WalletLotDto({@JsonKey(name: 'amount') this.amount, @JsonKey(name: 'expires_at') this.expiresAt}): super._();
factory _WalletLotDto.fromJson(Map<String, dynamic> json) => _$WalletLotDtoFromJson(json);
@override@JsonKey(name: 'amount') final int? amount;
@override@JsonKey(name: 'expires_at') final String? expiresAt;
/// Create a copy of WalletLotDto
/// with the given fields replaced by the non-null parameter values.
@override @JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
_$WalletLotDtoCopyWith<_WalletLotDto> get copyWith => __$WalletLotDtoCopyWithImpl<_WalletLotDto>(this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$WalletLotDtoToJson(this, );
}
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is _WalletLotDto&&(identical(other.amount, amount) || other.amount == amount)&&(identical(other.expiresAt, expiresAt) || other.expiresAt == expiresAt));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode {
return Object.hash(runtimeType,amount,expiresAt);
}
@override
String toString() {
return 'WalletLotDto(amount: $amount, expiresAt: $expiresAt)';
}
}
/// @nodoc
abstract mixin class _$WalletLotDtoCopyWith<$Res> implements $WalletLotDtoCopyWith<$Res> {
factory _$WalletLotDtoCopyWith(_WalletLotDto value, $Res Function(_WalletLotDto) _then) = __$WalletLotDtoCopyWithImpl;
@override @useResult
$Res call({
@JsonKey(name: 'amount') int? amount,@JsonKey(name: 'expires_at') String? expiresAt
});
}
/// @nodoc
class __$WalletLotDtoCopyWithImpl<$Res>
implements _$WalletLotDtoCopyWith<$Res> {
__$WalletLotDtoCopyWithImpl(this._self, this._then);
final _WalletLotDto _self;
final $Res Function(_WalletLotDto) _then;
/// Create a copy of WalletLotDto
/// with the given fields replaced by the non-null parameter values.
@override @pragma('vm:prefer-inline') $Res call({Object? amount = freezed,Object? expiresAt = freezed,}) {
return _then(_WalletLotDto(
amount: freezed == amount ? _self.amount : amount // ignore: cast_nullable_to_non_nullable
as int?,expiresAt: freezed == expiresAt ? _self.expiresAt : expiresAt // ignore: cast_nullable_to_non_nullable
as String?,
));
}
}
/// @nodoc
mixin _$TransferRecipientDto {
@JsonKey(name: 'name') String? get name;@JsonKey(name: 'phone_number') String? get phoneNumber;
/// Create a copy of TransferRecipientDto
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
$TransferRecipientDtoCopyWith<TransferRecipientDto> get copyWith => _$TransferRecipientDtoCopyWithImpl<TransferRecipientDto>(this as TransferRecipientDto, _$identity);
/// Serializes this TransferRecipientDto to a JSON map.
Map<String, dynamic> toJson();
@override
bool operator ==(Object other) {
final _this = this as TransferRecipientDto;
return identical(this, other) || (other.runtimeType == runtimeType&&other is TransferRecipientDto&&(identical(other.name, _this.name) || other.name == _this.name)&&(identical(other.phoneNumber, _this.phoneNumber) || other.phoneNumber == _this.phoneNumber));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode {
final _this = this as TransferRecipientDto;
return Object.hash(runtimeType,_this.name,_this.phoneNumber);
}
@override
String toString() {
final _this = this as TransferRecipientDto;
return 'TransferRecipientDto(name: ${_this.name}, phoneNumber: ${_this.phoneNumber})';
}
}
/// @nodoc
abstract mixin class $TransferRecipientDtoCopyWith<$Res> {
factory $TransferRecipientDtoCopyWith(TransferRecipientDto value, $Res Function(TransferRecipientDto) _then) = _$TransferRecipientDtoCopyWithImpl;
@useResult
$Res call({
@JsonKey(name: 'name') String? name,@JsonKey(name: 'phone_number') String? phoneNumber
});
}
/// @nodoc
class _$TransferRecipientDtoCopyWithImpl<$Res>
implements $TransferRecipientDtoCopyWith<$Res> {
_$TransferRecipientDtoCopyWithImpl(this._self, this._then);
final TransferRecipientDto _self;
final $Res Function(TransferRecipientDto) _then;
/// Create a copy of TransferRecipientDto
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @override $Res call({Object? name = freezed,Object? phoneNumber = freezed,}) {
return _then(TransferRecipientDto(
name: freezed == name ? _self.name : name // ignore: cast_nullable_to_non_nullable
as String?,phoneNumber: freezed == phoneNumber ? _self.phoneNumber : phoneNumber // ignore: cast_nullable_to_non_nullable
as String?,
));
}
}
/// Adds pattern-matching-related methods to [TransferRecipientDto].
extension TransferRecipientDtoPatterns on TransferRecipientDto {
/// 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( _TransferRecipientDto value)? $default,{required TResult orElse(),}){
final _that = this;
switch (_that) {
case _TransferRecipientDto() 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( _TransferRecipientDto value) $default,){
final _that = this;
switch (_that) {
case _TransferRecipientDto():
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( _TransferRecipientDto value)? $default,){
final _that = this;
switch (_that) {
case _TransferRecipientDto() 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: 'name') String? name, @JsonKey(name: 'phone_number') String? phoneNumber)? $default,{required TResult orElse(),}) {final _that = this;
switch (_that) {
case _TransferRecipientDto() when $default != null:
return $default(_that.name,_that.phoneNumber);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: 'name') String? name, @JsonKey(name: 'phone_number') String? phoneNumber) $default,) {final _that = this;
switch (_that) {
case _TransferRecipientDto():
return $default(_that.name,_that.phoneNumber);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: 'name') String? name, @JsonKey(name: 'phone_number') String? phoneNumber)? $default,) {final _that = this;
switch (_that) {
case _TransferRecipientDto() when $default != null:
return $default(_that.name,_that.phoneNumber);case _:
return null;
}
}
}
/// @nodoc
@JsonSerializable()
class _TransferRecipientDto extends TransferRecipientDto {
const _TransferRecipientDto({@JsonKey(name: 'name') this.name, @JsonKey(name: 'phone_number') this.phoneNumber}): super._();
factory _TransferRecipientDto.fromJson(Map<String, dynamic> json) => _$TransferRecipientDtoFromJson(json);
@override@JsonKey(name: 'name') final String? name;
@override@JsonKey(name: 'phone_number') final String? phoneNumber;
/// Create a copy of TransferRecipientDto
/// with the given fields replaced by the non-null parameter values.
@override @JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
_$TransferRecipientDtoCopyWith<_TransferRecipientDto> get copyWith => __$TransferRecipientDtoCopyWithImpl<_TransferRecipientDto>(this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$TransferRecipientDtoToJson(this, );
}
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is _TransferRecipientDto&&(identical(other.name, name) || other.name == name)&&(identical(other.phoneNumber, phoneNumber) || other.phoneNumber == phoneNumber));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode {
return Object.hash(runtimeType,name,phoneNumber);
}
@override
String toString() {
return 'TransferRecipientDto(name: $name, phoneNumber: $phoneNumber)';
}
}
/// @nodoc
abstract mixin class _$TransferRecipientDtoCopyWith<$Res> implements $TransferRecipientDtoCopyWith<$Res> {
factory _$TransferRecipientDtoCopyWith(_TransferRecipientDto value, $Res Function(_TransferRecipientDto) _then) = __$TransferRecipientDtoCopyWithImpl;
@override @useResult
$Res call({
@JsonKey(name: 'name') String? name,@JsonKey(name: 'phone_number') String? phoneNumber
});
}
/// @nodoc
class __$TransferRecipientDtoCopyWithImpl<$Res>
implements _$TransferRecipientDtoCopyWith<$Res> {
__$TransferRecipientDtoCopyWithImpl(this._self, this._then);
final _TransferRecipientDto _self;
final $Res Function(_TransferRecipientDto) _then;
/// Create a copy of TransferRecipientDto
/// with the given fields replaced by the non-null parameter values.
@override @pragma('vm:prefer-inline') $Res call({Object? name = freezed,Object? phoneNumber = freezed,}) {
return _then(_TransferRecipientDto(
name: freezed == name ? _self.name : name // ignore: cast_nullable_to_non_nullable
as String?,phoneNumber: freezed == phoneNumber ? _self.phoneNumber : phoneNumber // ignore: cast_nullable_to_non_nullable
as String?,
));
}
}
/// @nodoc
mixin _$TransferResultDto {
@JsonKey(name: 'currency') String? get currency;@JsonKey(name: 'amount') int? get amount;@JsonKey(name: 'recipient') TransferRecipientDto? get recipient;@JsonKey(name: 'lots') List<WalletLotDto>? get lots;@JsonKey(name: 'balance') int? get balance;@JsonKey(name: 'replayed') bool? get replayed;
/// Create a copy of TransferResultDto
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
$TransferResultDtoCopyWith<TransferResultDto> get copyWith => _$TransferResultDtoCopyWithImpl<TransferResultDto>(this as TransferResultDto, _$identity);
/// Serializes this TransferResultDto to a JSON map.
Map<String, dynamic> toJson();
@override
bool operator ==(Object other) {
final _this = this as TransferResultDto;
return identical(this, other) || (other.runtimeType == runtimeType&&other is TransferResultDto&&(identical(other.currency, _this.currency) || other.currency == _this.currency)&&(identical(other.amount, _this.amount) || other.amount == _this.amount)&&(identical(other.recipient, _this.recipient) || other.recipient == _this.recipient)&&const DeepCollectionEquality().equals(other.lots, _this.lots)&&(identical(other.balance, _this.balance) || other.balance == _this.balance)&&(identical(other.replayed, _this.replayed) || other.replayed == _this.replayed));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode {
final _this = this as TransferResultDto;
return Object.hash(runtimeType,_this.currency,_this.amount,_this.recipient,const DeepCollectionEquality().hash(_this.lots),_this.balance,_this.replayed);
}
@override
String toString() {
final _this = this as TransferResultDto;
return 'TransferResultDto(currency: ${_this.currency}, amount: ${_this.amount}, recipient: ${_this.recipient}, lots: ${_this.lots}, balance: ${_this.balance}, replayed: ${_this.replayed})';
}
}
/// @nodoc
abstract mixin class $TransferResultDtoCopyWith<$Res> {
factory $TransferResultDtoCopyWith(TransferResultDto value, $Res Function(TransferResultDto) _then) = _$TransferResultDtoCopyWithImpl;
@useResult
$Res call({
@JsonKey(name: 'currency') String? currency,@JsonKey(name: 'amount') int? amount,@JsonKey(name: 'recipient') TransferRecipientDto? recipient,@JsonKey(name: 'lots') List<WalletLotDto>? lots,@JsonKey(name: 'balance') int? balance,@JsonKey(name: 'replayed') bool? replayed
});
$TransferRecipientDtoCopyWith<$Res>? get recipient;
}
/// @nodoc
class _$TransferResultDtoCopyWithImpl<$Res>
implements $TransferResultDtoCopyWith<$Res> {
_$TransferResultDtoCopyWithImpl(this._self, this._then);
final TransferResultDto _self;
final $Res Function(TransferResultDto) _then;
/// Create a copy of TransferResultDto
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @override $Res call({Object? currency = freezed,Object? amount = freezed,Object? recipient = freezed,Object? lots = freezed,Object? balance = freezed,Object? replayed = freezed,}) {
return _then(TransferResultDto(
currency: freezed == currency ? _self.currency : currency // ignore: cast_nullable_to_non_nullable
as String?,amount: freezed == amount ? _self.amount : amount // ignore: cast_nullable_to_non_nullable
as int?,recipient: freezed == recipient ? _self.recipient : recipient // ignore: cast_nullable_to_non_nullable
as TransferRecipientDto?,lots: freezed == lots ? _self.lots : lots // ignore: cast_nullable_to_non_nullable
as List<WalletLotDto>?,balance: freezed == balance ? _self.balance : balance // ignore: cast_nullable_to_non_nullable
as int?,replayed: freezed == replayed ? _self.replayed : replayed // ignore: cast_nullable_to_non_nullable
as bool?,
));
}
/// Create a copy of TransferResultDto
/// with the given fields replaced by the non-null parameter values.
@override
@pragma('vm:prefer-inline')
$TransferRecipientDtoCopyWith<$Res>? get recipient {
if (_self.recipient == null) {
return null;
}
return $TransferRecipientDtoCopyWith<$Res>(_self.recipient!, (value) {
return _then(_self.copyWith(recipient: value));
});
}
}
/// Adds pattern-matching-related methods to [TransferResultDto].
extension TransferResultDtoPatterns on TransferResultDto {
/// 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( _TransferResultDto value)? $default,{required TResult orElse(),}){
final _that = this;
switch (_that) {
case _TransferResultDto() 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( _TransferResultDto value) $default,){
final _that = this;
switch (_that) {
case _TransferResultDto():
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( _TransferResultDto value)? $default,){
final _that = this;
switch (_that) {
case _TransferResultDto() 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: 'currency') String? currency, @JsonKey(name: 'amount') int? amount, @JsonKey(name: 'recipient') TransferRecipientDto? recipient, @JsonKey(name: 'lots') List<WalletLotDto>? lots, @JsonKey(name: 'balance') int? balance, @JsonKey(name: 'replayed') bool? replayed)? $default,{required TResult orElse(),}) {final _that = this;
switch (_that) {
case _TransferResultDto() when $default != null:
return $default(_that.currency,_that.amount,_that.recipient,_that.lots,_that.balance,_that.replayed);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: 'currency') String? currency, @JsonKey(name: 'amount') int? amount, @JsonKey(name: 'recipient') TransferRecipientDto? recipient, @JsonKey(name: 'lots') List<WalletLotDto>? lots, @JsonKey(name: 'balance') int? balance, @JsonKey(name: 'replayed') bool? replayed) $default,) {final _that = this;
switch (_that) {
case _TransferResultDto():
return $default(_that.currency,_that.amount,_that.recipient,_that.lots,_that.balance,_that.replayed);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: 'currency') String? currency, @JsonKey(name: 'amount') int? amount, @JsonKey(name: 'recipient') TransferRecipientDto? recipient, @JsonKey(name: 'lots') List<WalletLotDto>? lots, @JsonKey(name: 'balance') int? balance, @JsonKey(name: 'replayed') bool? replayed)? $default,) {final _that = this;
switch (_that) {
case _TransferResultDto() when $default != null:
return $default(_that.currency,_that.amount,_that.recipient,_that.lots,_that.balance,_that.replayed);case _:
return null;
}
}
}
/// @nodoc
@JsonSerializable()
class _TransferResultDto extends TransferResultDto {
const _TransferResultDto({@JsonKey(name: 'currency') this.currency, @JsonKey(name: 'amount') this.amount, @JsonKey(name: 'recipient') this.recipient, @JsonKey(name: 'lots') List<WalletLotDto>? lots, @JsonKey(name: 'balance') this.balance, @JsonKey(name: 'replayed') this.replayed}): _lots = lots,super._();
factory _TransferResultDto.fromJson(Map<String, dynamic> json) => _$TransferResultDtoFromJson(json);
@override@JsonKey(name: 'currency') final String? currency;
@override@JsonKey(name: 'amount') final int? amount;
@override@JsonKey(name: 'recipient') final TransferRecipientDto? recipient;
final List<WalletLotDto>? _lots;
@override@JsonKey(name: 'lots') List<WalletLotDto>? get lots {
final value = _lots;
if (value == null) return null;
if (_lots is EqualUnmodifiableListView) return _lots;
// ignore: implicit_dynamic_type
return EqualUnmodifiableListView(value);
}
@override@JsonKey(name: 'balance') final int? balance;
@override@JsonKey(name: 'replayed') final bool? replayed;
/// Create a copy of TransferResultDto
/// with the given fields replaced by the non-null parameter values.
@override @JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
_$TransferResultDtoCopyWith<_TransferResultDto> get copyWith => __$TransferResultDtoCopyWithImpl<_TransferResultDto>(this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$TransferResultDtoToJson(this, );
}
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is _TransferResultDto&&(identical(other.currency, currency) || other.currency == currency)&&(identical(other.amount, amount) || other.amount == amount)&&(identical(other.recipient, recipient) || other.recipient == recipient)&&const DeepCollectionEquality().equals(other.lots, _lots)&&(identical(other.balance, balance) || other.balance == balance)&&(identical(other.replayed, replayed) || other.replayed == replayed));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode {
return Object.hash(runtimeType,currency,amount,recipient,const DeepCollectionEquality().hash(_lots),balance,replayed);
}
@override
String toString() {
return 'TransferResultDto(currency: $currency, amount: $amount, recipient: $recipient, lots: $lots, balance: $balance, replayed: $replayed)';
}
}
/// @nodoc
abstract mixin class _$TransferResultDtoCopyWith<$Res> implements $TransferResultDtoCopyWith<$Res> {
factory _$TransferResultDtoCopyWith(_TransferResultDto value, $Res Function(_TransferResultDto) _then) = __$TransferResultDtoCopyWithImpl;
@override @useResult
$Res call({
@JsonKey(name: 'currency') String? currency,@JsonKey(name: 'amount') int? amount,@JsonKey(name: 'recipient') TransferRecipientDto? recipient,@JsonKey(name: 'lots') List<WalletLotDto>? lots,@JsonKey(name: 'balance') int? balance,@JsonKey(name: 'replayed') bool? replayed
});
@override $TransferRecipientDtoCopyWith<$Res>? get recipient;
}
/// @nodoc
class __$TransferResultDtoCopyWithImpl<$Res>
implements _$TransferResultDtoCopyWith<$Res> {
__$TransferResultDtoCopyWithImpl(this._self, this._then);
final _TransferResultDto _self;
final $Res Function(_TransferResultDto) _then;
/// Create a copy of TransferResultDto
/// with the given fields replaced by the non-null parameter values.
@override @pragma('vm:prefer-inline') $Res call({Object? currency = freezed,Object? amount = freezed,Object? recipient = freezed,Object? lots = freezed,Object? balance = freezed,Object? replayed = freezed,}) {
return _then(_TransferResultDto(
currency: freezed == currency ? _self.currency : currency // ignore: cast_nullable_to_non_nullable
as String?,amount: freezed == amount ? _self.amount : amount // ignore: cast_nullable_to_non_nullable
as int?,recipient: freezed == recipient ? _self.recipient : recipient // ignore: cast_nullable_to_non_nullable
as TransferRecipientDto?,lots: freezed == lots ? _self._lots : lots // ignore: cast_nullable_to_non_nullable
as List<WalletLotDto>?,balance: freezed == balance ? _self.balance : balance // ignore: cast_nullable_to_non_nullable
as int?,replayed: freezed == replayed ? _self.replayed : replayed // ignore: cast_nullable_to_non_nullable
as bool?,
));
}
/// Create a copy of TransferResultDto
/// with the given fields replaced by the non-null parameter values.
@override
@pragma('vm:prefer-inline')
$TransferRecipientDtoCopyWith<$Res>? get recipient {
if (_self.recipient == null) {
return null;
}
return $TransferRecipientDtoCopyWith<$Res>(_self.recipient!, (value) {
return _then(_self.copyWith(recipient: value));
});
}
}
/// @nodoc
mixin _$PinStatusDto {
@JsonKey(name: 'has_pin') bool? get hasPin;@JsonKey(name: 'locked_until') String? get lockedUntil;@JsonKey(name: 'transfer_blocked_until') String? get transferBlockedUntil;
/// Create a copy of PinStatusDto
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
$PinStatusDtoCopyWith<PinStatusDto> get copyWith => _$PinStatusDtoCopyWithImpl<PinStatusDto>(this as PinStatusDto, _$identity);
/// Serializes this PinStatusDto to a JSON map.
Map<String, dynamic> toJson();
@override
bool operator ==(Object other) {
final _this = this as PinStatusDto;
return identical(this, other) || (other.runtimeType == runtimeType&&other is PinStatusDto&&(identical(other.hasPin, _this.hasPin) || other.hasPin == _this.hasPin)&&(identical(other.lockedUntil, _this.lockedUntil) || other.lockedUntil == _this.lockedUntil)&&(identical(other.transferBlockedUntil, _this.transferBlockedUntil) || other.transferBlockedUntil == _this.transferBlockedUntil));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode {
final _this = this as PinStatusDto;
return Object.hash(runtimeType,_this.hasPin,_this.lockedUntil,_this.transferBlockedUntil);
}
@override
String toString() {
final _this = this as PinStatusDto;
return 'PinStatusDto(hasPin: ${_this.hasPin}, lockedUntil: ${_this.lockedUntil}, transferBlockedUntil: ${_this.transferBlockedUntil})';
}
}
/// @nodoc
abstract mixin class $PinStatusDtoCopyWith<$Res> {
factory $PinStatusDtoCopyWith(PinStatusDto value, $Res Function(PinStatusDto) _then) = _$PinStatusDtoCopyWithImpl;
@useResult
$Res call({
@JsonKey(name: 'has_pin') bool? hasPin,@JsonKey(name: 'locked_until') String? lockedUntil,@JsonKey(name: 'transfer_blocked_until') String? transferBlockedUntil
});
}
/// @nodoc
class _$PinStatusDtoCopyWithImpl<$Res>
implements $PinStatusDtoCopyWith<$Res> {
_$PinStatusDtoCopyWithImpl(this._self, this._then);
final PinStatusDto _self;
final $Res Function(PinStatusDto) _then;
/// Create a copy of PinStatusDto
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @override $Res call({Object? hasPin = freezed,Object? lockedUntil = freezed,Object? transferBlockedUntil = freezed,}) {
return _then(PinStatusDto(
hasPin: freezed == hasPin ? _self.hasPin : hasPin // ignore: cast_nullable_to_non_nullable
as bool?,lockedUntil: freezed == lockedUntil ? _self.lockedUntil : lockedUntil // ignore: cast_nullable_to_non_nullable
as String?,transferBlockedUntil: freezed == transferBlockedUntil ? _self.transferBlockedUntil : transferBlockedUntil // ignore: cast_nullable_to_non_nullable
as String?,
));
}
}
/// Adds pattern-matching-related methods to [PinStatusDto].
extension PinStatusDtoPatterns on PinStatusDto {
/// 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( _PinStatusDto value)? $default,{required TResult orElse(),}){
final _that = this;
switch (_that) {
case _PinStatusDto() 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( _PinStatusDto value) $default,){
final _that = this;
switch (_that) {
case _PinStatusDto():
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( _PinStatusDto value)? $default,){
final _that = this;
switch (_that) {
case _PinStatusDto() 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: 'has_pin') bool? hasPin, @JsonKey(name: 'locked_until') String? lockedUntil, @JsonKey(name: 'transfer_blocked_until') String? transferBlockedUntil)? $default,{required TResult orElse(),}) {final _that = this;
switch (_that) {
case _PinStatusDto() when $default != null:
return $default(_that.hasPin,_that.lockedUntil,_that.transferBlockedUntil);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: 'has_pin') bool? hasPin, @JsonKey(name: 'locked_until') String? lockedUntil, @JsonKey(name: 'transfer_blocked_until') String? transferBlockedUntil) $default,) {final _that = this;
switch (_that) {
case _PinStatusDto():
return $default(_that.hasPin,_that.lockedUntil,_that.transferBlockedUntil);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: 'has_pin') bool? hasPin, @JsonKey(name: 'locked_until') String? lockedUntil, @JsonKey(name: 'transfer_blocked_until') String? transferBlockedUntil)? $default,) {final _that = this;
switch (_that) {
case _PinStatusDto() when $default != null:
return $default(_that.hasPin,_that.lockedUntil,_that.transferBlockedUntil);case _:
return null;
}
}
}
/// @nodoc
@JsonSerializable()
class _PinStatusDto extends PinStatusDto {
const _PinStatusDto({@JsonKey(name: 'has_pin') this.hasPin, @JsonKey(name: 'locked_until') this.lockedUntil, @JsonKey(name: 'transfer_blocked_until') this.transferBlockedUntil}): super._();
factory _PinStatusDto.fromJson(Map<String, dynamic> json) => _$PinStatusDtoFromJson(json);
@override@JsonKey(name: 'has_pin') final bool? hasPin;
@override@JsonKey(name: 'locked_until') final String? lockedUntil;
@override@JsonKey(name: 'transfer_blocked_until') final String? transferBlockedUntil;
/// Create a copy of PinStatusDto
/// with the given fields replaced by the non-null parameter values.
@override @JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
_$PinStatusDtoCopyWith<_PinStatusDto> get copyWith => __$PinStatusDtoCopyWithImpl<_PinStatusDto>(this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$PinStatusDtoToJson(this, );
}
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is _PinStatusDto&&(identical(other.hasPin, hasPin) || other.hasPin == hasPin)&&(identical(other.lockedUntil, lockedUntil) || other.lockedUntil == lockedUntil)&&(identical(other.transferBlockedUntil, transferBlockedUntil) || other.transferBlockedUntil == transferBlockedUntil));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode {
return Object.hash(runtimeType,hasPin,lockedUntil,transferBlockedUntil);
}
@override
String toString() {
return 'PinStatusDto(hasPin: $hasPin, lockedUntil: $lockedUntil, transferBlockedUntil: $transferBlockedUntil)';
}
}
/// @nodoc
abstract mixin class _$PinStatusDtoCopyWith<$Res> implements $PinStatusDtoCopyWith<$Res> {
factory _$PinStatusDtoCopyWith(_PinStatusDto value, $Res Function(_PinStatusDto) _then) = __$PinStatusDtoCopyWithImpl;
@override @useResult
$Res call({
@JsonKey(name: 'has_pin') bool? hasPin,@JsonKey(name: 'locked_until') String? lockedUntil,@JsonKey(name: 'transfer_blocked_until') String? transferBlockedUntil
});
}
/// @nodoc
class __$PinStatusDtoCopyWithImpl<$Res>
implements _$PinStatusDtoCopyWith<$Res> {
__$PinStatusDtoCopyWithImpl(this._self, this._then);
final _PinStatusDto _self;
final $Res Function(_PinStatusDto) _then;
/// Create a copy of PinStatusDto
/// with the given fields replaced by the non-null parameter values.
@override @pragma('vm:prefer-inline') $Res call({Object? hasPin = freezed,Object? lockedUntil = freezed,Object? transferBlockedUntil = freezed,}) {
return _then(_PinStatusDto(
hasPin: freezed == hasPin ? _self.hasPin : hasPin // ignore: cast_nullable_to_non_nullable
as bool?,lockedUntil: freezed == lockedUntil ? _self.lockedUntil : lockedUntil // ignore: cast_nullable_to_non_nullable
as String?,transferBlockedUntil: freezed == transferBlockedUntil ? _self.transferBlockedUntil : transferBlockedUntil // ignore: cast_nullable_to_non_nullable
as String?,
));
}
}
/// @nodoc
mixin _$PinOtpDto {
@JsonKey(name: 'purpose') String? get purpose;@JsonKey(name: 'otp_token') String? get otpToken;@JsonKey(name: 'expires_at') String? get expiresAt;
/// Create a copy of PinOtpDto
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
$PinOtpDtoCopyWith<PinOtpDto> get copyWith => _$PinOtpDtoCopyWithImpl<PinOtpDto>(this as PinOtpDto, _$identity);
/// Serializes this PinOtpDto to a JSON map.
Map<String, dynamic> toJson();
@override
bool operator ==(Object other) {
final _this = this as PinOtpDto;
return identical(this, other) || (other.runtimeType == runtimeType&&other is PinOtpDto&&(identical(other.purpose, _this.purpose) || other.purpose == _this.purpose)&&(identical(other.otpToken, _this.otpToken) || other.otpToken == _this.otpToken)&&(identical(other.expiresAt, _this.expiresAt) || other.expiresAt == _this.expiresAt));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode {
final _this = this as PinOtpDto;
return Object.hash(runtimeType,_this.purpose,_this.otpToken,_this.expiresAt);
}
@override
String toString() {
final _this = this as PinOtpDto;
return 'PinOtpDto(purpose: ${_this.purpose}, otpToken: ${_this.otpToken}, expiresAt: ${_this.expiresAt})';
}
}
/// @nodoc
abstract mixin class $PinOtpDtoCopyWith<$Res> {
factory $PinOtpDtoCopyWith(PinOtpDto value, $Res Function(PinOtpDto) _then) = _$PinOtpDtoCopyWithImpl;
@useResult
$Res call({
@JsonKey(name: 'purpose') String? purpose,@JsonKey(name: 'otp_token') String? otpToken,@JsonKey(name: 'expires_at') String? expiresAt
});
}
/// @nodoc
class _$PinOtpDtoCopyWithImpl<$Res>
implements $PinOtpDtoCopyWith<$Res> {
_$PinOtpDtoCopyWithImpl(this._self, this._then);
final PinOtpDto _self;
final $Res Function(PinOtpDto) _then;
/// Create a copy of PinOtpDto
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @override $Res call({Object? purpose = freezed,Object? otpToken = freezed,Object? expiresAt = freezed,}) {
return _then(PinOtpDto(
purpose: freezed == purpose ? _self.purpose : purpose // ignore: cast_nullable_to_non_nullable
as String?,otpToken: freezed == otpToken ? _self.otpToken : otpToken // ignore: cast_nullable_to_non_nullable
as String?,expiresAt: freezed == expiresAt ? _self.expiresAt : expiresAt // ignore: cast_nullable_to_non_nullable
as String?,
));
}
}
/// Adds pattern-matching-related methods to [PinOtpDto].
extension PinOtpDtoPatterns on PinOtpDto {
/// 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( _PinOtpDto value)? $default,{required TResult orElse(),}){
final _that = this;
switch (_that) {
case _PinOtpDto() 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( _PinOtpDto value) $default,){
final _that = this;
switch (_that) {
case _PinOtpDto():
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( _PinOtpDto value)? $default,){
final _that = this;
switch (_that) {
case _PinOtpDto() 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: 'purpose') String? purpose, @JsonKey(name: 'otp_token') String? otpToken, @JsonKey(name: 'expires_at') String? expiresAt)? $default,{required TResult orElse(),}) {final _that = this;
switch (_that) {
case _PinOtpDto() when $default != null:
return $default(_that.purpose,_that.otpToken,_that.expiresAt);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: 'purpose') String? purpose, @JsonKey(name: 'otp_token') String? otpToken, @JsonKey(name: 'expires_at') String? expiresAt) $default,) {final _that = this;
switch (_that) {
case _PinOtpDto():
return $default(_that.purpose,_that.otpToken,_that.expiresAt);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: 'purpose') String? purpose, @JsonKey(name: 'otp_token') String? otpToken, @JsonKey(name: 'expires_at') String? expiresAt)? $default,) {final _that = this;
switch (_that) {
case _PinOtpDto() when $default != null:
return $default(_that.purpose,_that.otpToken,_that.expiresAt);case _:
return null;
}
}
}
/// @nodoc
@JsonSerializable()
class _PinOtpDto extends PinOtpDto {
const _PinOtpDto({@JsonKey(name: 'purpose') this.purpose, @JsonKey(name: 'otp_token') this.otpToken, @JsonKey(name: 'expires_at') this.expiresAt}): super._();
factory _PinOtpDto.fromJson(Map<String, dynamic> json) => _$PinOtpDtoFromJson(json);
@override@JsonKey(name: 'purpose') final String? purpose;
@override@JsonKey(name: 'otp_token') final String? otpToken;
@override@JsonKey(name: 'expires_at') final String? expiresAt;
/// Create a copy of PinOtpDto
/// with the given fields replaced by the non-null parameter values.
@override @JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
_$PinOtpDtoCopyWith<_PinOtpDto> get copyWith => __$PinOtpDtoCopyWithImpl<_PinOtpDto>(this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$PinOtpDtoToJson(this, );
}
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is _PinOtpDto&&(identical(other.purpose, purpose) || other.purpose == purpose)&&(identical(other.otpToken, otpToken) || other.otpToken == otpToken)&&(identical(other.expiresAt, expiresAt) || other.expiresAt == expiresAt));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode {
return Object.hash(runtimeType,purpose,otpToken,expiresAt);
}
@override
String toString() {
return 'PinOtpDto(purpose: $purpose, otpToken: $otpToken, expiresAt: $expiresAt)';
}
}
/// @nodoc
abstract mixin class _$PinOtpDtoCopyWith<$Res> implements $PinOtpDtoCopyWith<$Res> {
factory _$PinOtpDtoCopyWith(_PinOtpDto value, $Res Function(_PinOtpDto) _then) = __$PinOtpDtoCopyWithImpl;
@override @useResult
$Res call({
@JsonKey(name: 'purpose') String? purpose,@JsonKey(name: 'otp_token') String? otpToken,@JsonKey(name: 'expires_at') String? expiresAt
});
}
/// @nodoc
class __$PinOtpDtoCopyWithImpl<$Res>
implements _$PinOtpDtoCopyWith<$Res> {
__$PinOtpDtoCopyWithImpl(this._self, this._then);
final _PinOtpDto _self;
final $Res Function(_PinOtpDto) _then;
/// Create a copy of PinOtpDto
/// with the given fields replaced by the non-null parameter values.
@override @pragma('vm:prefer-inline') $Res call({Object? purpose = freezed,Object? otpToken = freezed,Object? expiresAt = freezed,}) {
return _then(_PinOtpDto(
purpose: freezed == purpose ? _self.purpose : purpose // ignore: cast_nullable_to_non_nullable
as String?,otpToken: freezed == otpToken ? _self.otpToken : otpToken // ignore: cast_nullable_to_non_nullable
as String?,expiresAt: freezed == expiresAt ? _self.expiresAt : expiresAt // ignore: cast_nullable_to_non_nullable
as String?,
));
}
}
/// @nodoc
mixin _$OutletDto {
@JsonKey(name: 'id') String? get id;@JsonKey(name: 'name') String? get name;@JsonKey(name: 'address') String? get address;@JsonKey(name: 'accepts_point_payment') bool? get acceptsPointPayment;@JsonKey(name: 'earns_points') bool? get earnsPoints;@JsonKey(name: 'earns_coins') bool? get earnsCoins;
/// Create a copy of OutletDto
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
$OutletDtoCopyWith<OutletDto> get copyWith => _$OutletDtoCopyWithImpl<OutletDto>(this as OutletDto, _$identity);
/// Serializes this OutletDto to a JSON map.
Map<String, dynamic> toJson();
@override
bool operator ==(Object other) {
final _this = this as OutletDto;
return identical(this, other) || (other.runtimeType == runtimeType&&other is OutletDto&&(identical(other.id, _this.id) || other.id == _this.id)&&(identical(other.name, _this.name) || other.name == _this.name)&&(identical(other.address, _this.address) || other.address == _this.address)&&(identical(other.acceptsPointPayment, _this.acceptsPointPayment) || other.acceptsPointPayment == _this.acceptsPointPayment)&&(identical(other.earnsPoints, _this.earnsPoints) || other.earnsPoints == _this.earnsPoints)&&(identical(other.earnsCoins, _this.earnsCoins) || other.earnsCoins == _this.earnsCoins));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode {
final _this = this as OutletDto;
return Object.hash(runtimeType,_this.id,_this.name,_this.address,_this.acceptsPointPayment,_this.earnsPoints,_this.earnsCoins);
}
@override
String toString() {
final _this = this as OutletDto;
return 'OutletDto(id: ${_this.id}, name: ${_this.name}, address: ${_this.address}, acceptsPointPayment: ${_this.acceptsPointPayment}, earnsPoints: ${_this.earnsPoints}, earnsCoins: ${_this.earnsCoins})';
}
}
/// @nodoc
abstract mixin class $OutletDtoCopyWith<$Res> {
factory $OutletDtoCopyWith(OutletDto value, $Res Function(OutletDto) _then) = _$OutletDtoCopyWithImpl;
@useResult
$Res call({
@JsonKey(name: 'id') String? id,@JsonKey(name: 'name') String? name,@JsonKey(name: 'address') String? address,@JsonKey(name: 'accepts_point_payment') bool? acceptsPointPayment,@JsonKey(name: 'earns_points') bool? earnsPoints,@JsonKey(name: 'earns_coins') bool? earnsCoins
});
}
/// @nodoc
class _$OutletDtoCopyWithImpl<$Res>
implements $OutletDtoCopyWith<$Res> {
_$OutletDtoCopyWithImpl(this._self, this._then);
final OutletDto _self;
final $Res Function(OutletDto) _then;
/// Create a copy of OutletDto
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @override $Res call({Object? id = freezed,Object? name = freezed,Object? address = freezed,Object? acceptsPointPayment = freezed,Object? earnsPoints = freezed,Object? earnsCoins = freezed,}) {
return _then(OutletDto(
id: freezed == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
as String?,name: freezed == name ? _self.name : name // ignore: cast_nullable_to_non_nullable
as String?,address: freezed == address ? _self.address : address // ignore: cast_nullable_to_non_nullable
as String?,acceptsPointPayment: freezed == acceptsPointPayment ? _self.acceptsPointPayment : acceptsPointPayment // ignore: cast_nullable_to_non_nullable
as bool?,earnsPoints: freezed == earnsPoints ? _self.earnsPoints : earnsPoints // ignore: cast_nullable_to_non_nullable
as bool?,earnsCoins: freezed == earnsCoins ? _self.earnsCoins : earnsCoins // ignore: cast_nullable_to_non_nullable
as bool?,
));
}
}
/// Adds pattern-matching-related methods to [OutletDto].
extension OutletDtoPatterns on OutletDto {
/// 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( _OutletDto value)? $default,{required TResult orElse(),}){
final _that = this;
switch (_that) {
case _OutletDto() 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( _OutletDto value) $default,){
final _that = this;
switch (_that) {
case _OutletDto():
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( _OutletDto value)? $default,){
final _that = this;
switch (_that) {
case _OutletDto() 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: 'id') String? id, @JsonKey(name: 'name') String? name, @JsonKey(name: 'address') String? address, @JsonKey(name: 'accepts_point_payment') bool? acceptsPointPayment, @JsonKey(name: 'earns_points') bool? earnsPoints, @JsonKey(name: 'earns_coins') bool? earnsCoins)? $default,{required TResult orElse(),}) {final _that = this;
switch (_that) {
case _OutletDto() when $default != null:
return $default(_that.id,_that.name,_that.address,_that.acceptsPointPayment,_that.earnsPoints,_that.earnsCoins);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: 'id') String? id, @JsonKey(name: 'name') String? name, @JsonKey(name: 'address') String? address, @JsonKey(name: 'accepts_point_payment') bool? acceptsPointPayment, @JsonKey(name: 'earns_points') bool? earnsPoints, @JsonKey(name: 'earns_coins') bool? earnsCoins) $default,) {final _that = this;
switch (_that) {
case _OutletDto():
return $default(_that.id,_that.name,_that.address,_that.acceptsPointPayment,_that.earnsPoints,_that.earnsCoins);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: 'id') String? id, @JsonKey(name: 'name') String? name, @JsonKey(name: 'address') String? address, @JsonKey(name: 'accepts_point_payment') bool? acceptsPointPayment, @JsonKey(name: 'earns_points') bool? earnsPoints, @JsonKey(name: 'earns_coins') bool? earnsCoins)? $default,) {final _that = this;
switch (_that) {
case _OutletDto() when $default != null:
return $default(_that.id,_that.name,_that.address,_that.acceptsPointPayment,_that.earnsPoints,_that.earnsCoins);case _:
return null;
}
}
}
/// @nodoc
@JsonSerializable()
class _OutletDto extends OutletDto {
const _OutletDto({@JsonKey(name: 'id') this.id, @JsonKey(name: 'name') this.name, @JsonKey(name: 'address') this.address, @JsonKey(name: 'accepts_point_payment') this.acceptsPointPayment, @JsonKey(name: 'earns_points') this.earnsPoints, @JsonKey(name: 'earns_coins') this.earnsCoins}): super._();
factory _OutletDto.fromJson(Map<String, dynamic> json) => _$OutletDtoFromJson(json);
@override@JsonKey(name: 'id') final String? id;
@override@JsonKey(name: 'name') final String? name;
@override@JsonKey(name: 'address') final String? address;
@override@JsonKey(name: 'accepts_point_payment') final bool? acceptsPointPayment;
@override@JsonKey(name: 'earns_points') final bool? earnsPoints;
@override@JsonKey(name: 'earns_coins') final bool? earnsCoins;
/// Create a copy of OutletDto
/// with the given fields replaced by the non-null parameter values.
@override @JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
_$OutletDtoCopyWith<_OutletDto> get copyWith => __$OutletDtoCopyWithImpl<_OutletDto>(this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$OutletDtoToJson(this, );
}
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is _OutletDto&&(identical(other.id, id) || other.id == id)&&(identical(other.name, name) || other.name == name)&&(identical(other.address, address) || other.address == address)&&(identical(other.acceptsPointPayment, acceptsPointPayment) || other.acceptsPointPayment == acceptsPointPayment)&&(identical(other.earnsPoints, earnsPoints) || other.earnsPoints == earnsPoints)&&(identical(other.earnsCoins, earnsCoins) || other.earnsCoins == earnsCoins));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode {
return Object.hash(runtimeType,id,name,address,acceptsPointPayment,earnsPoints,earnsCoins);
}
@override
String toString() {
return 'OutletDto(id: $id, name: $name, address: $address, acceptsPointPayment: $acceptsPointPayment, earnsPoints: $earnsPoints, earnsCoins: $earnsCoins)';
}
}
/// @nodoc
abstract mixin class _$OutletDtoCopyWith<$Res> implements $OutletDtoCopyWith<$Res> {
factory _$OutletDtoCopyWith(_OutletDto value, $Res Function(_OutletDto) _then) = __$OutletDtoCopyWithImpl;
@override @useResult
$Res call({
@JsonKey(name: 'id') String? id,@JsonKey(name: 'name') String? name,@JsonKey(name: 'address') String? address,@JsonKey(name: 'accepts_point_payment') bool? acceptsPointPayment,@JsonKey(name: 'earns_points') bool? earnsPoints,@JsonKey(name: 'earns_coins') bool? earnsCoins
});
}
/// @nodoc
class __$OutletDtoCopyWithImpl<$Res>
implements _$OutletDtoCopyWith<$Res> {
__$OutletDtoCopyWithImpl(this._self, this._then);
final _OutletDto _self;
final $Res Function(_OutletDto) _then;
/// Create a copy of OutletDto
/// with the given fields replaced by the non-null parameter values.
@override @pragma('vm:prefer-inline') $Res call({Object? id = freezed,Object? name = freezed,Object? address = freezed,Object? acceptsPointPayment = freezed,Object? earnsPoints = freezed,Object? earnsCoins = freezed,}) {
return _then(_OutletDto(
id: freezed == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
as String?,name: freezed == name ? _self.name : name // ignore: cast_nullable_to_non_nullable
as String?,address: freezed == address ? _self.address : address // ignore: cast_nullable_to_non_nullable
as String?,acceptsPointPayment: freezed == acceptsPointPayment ? _self.acceptsPointPayment : acceptsPointPayment // ignore: cast_nullable_to_non_nullable
as bool?,earnsPoints: freezed == earnsPoints ? _self.earnsPoints : earnsPoints // ignore: cast_nullable_to_non_nullable
as bool?,earnsCoins: freezed == earnsCoins ? _self.earnsCoins : earnsCoins // ignore: cast_nullable_to_non_nullable
as bool?,
));
}
}
/// @nodoc
mixin _$CustomerOrderDto {
@JsonKey(name: 'id') String? get id;@JsonKey(name: 'order_number') String? get orderNumber;@JsonKey(name: 'outlet_name') String? get outletName;@JsonKey(name: 'order_type') String? get orderType;@JsonKey(name: 'status') String? get status;@JsonKey(name: 'payment_status') String? get paymentStatus;@JsonKey(name: 'total_amount') int? get totalAmount;@JsonKey(name: 'item_count') int? get itemCount;@JsonKey(name: 'is_void') bool? get isVoid;@JsonKey(name: 'is_refund') bool? get isRefund;@JsonKey(name: 'points_earned') int? get pointsEarned;@JsonKey(name: 'coins_earned') int? get coinsEarned;@JsonKey(name: 'created_at') String? get createdAt;@JsonKey(name: 'table_number') String? get tableNumber;@JsonKey(name: 'subtotal') int? get subtotal;@JsonKey(name: 'discount_amount') int? get discountAmount;@JsonKey(name: 'tax_amount') int? get taxAmount;@JsonKey(name: 'refund_amount') int? get refundAmount;@JsonKey(name: 'items') List<CustomerOrderItemDto>? get items;@JsonKey(name: 'payments') List<CustomerOrderPaymentDto>? get payments;
/// Create a copy of CustomerOrderDto
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
$CustomerOrderDtoCopyWith<CustomerOrderDto> get copyWith => _$CustomerOrderDtoCopyWithImpl<CustomerOrderDto>(this as CustomerOrderDto, _$identity);
/// Serializes this CustomerOrderDto to a JSON map.
Map<String, dynamic> toJson();
@override
bool operator ==(Object other) {
final _this = this as CustomerOrderDto;
return identical(this, other) || (other.runtimeType == runtimeType&&other is CustomerOrderDto&&(identical(other.id, _this.id) || other.id == _this.id)&&(identical(other.orderNumber, _this.orderNumber) || other.orderNumber == _this.orderNumber)&&(identical(other.outletName, _this.outletName) || other.outletName == _this.outletName)&&(identical(other.orderType, _this.orderType) || other.orderType == _this.orderType)&&(identical(other.status, _this.status) || other.status == _this.status)&&(identical(other.paymentStatus, _this.paymentStatus) || other.paymentStatus == _this.paymentStatus)&&(identical(other.totalAmount, _this.totalAmount) || other.totalAmount == _this.totalAmount)&&(identical(other.itemCount, _this.itemCount) || other.itemCount == _this.itemCount)&&(identical(other.isVoid, _this.isVoid) || other.isVoid == _this.isVoid)&&(identical(other.isRefund, _this.isRefund) || other.isRefund == _this.isRefund)&&(identical(other.pointsEarned, _this.pointsEarned) || other.pointsEarned == _this.pointsEarned)&&(identical(other.coinsEarned, _this.coinsEarned) || other.coinsEarned == _this.coinsEarned)&&(identical(other.createdAt, _this.createdAt) || other.createdAt == _this.createdAt)&&(identical(other.tableNumber, _this.tableNumber) || other.tableNumber == _this.tableNumber)&&(identical(other.subtotal, _this.subtotal) || other.subtotal == _this.subtotal)&&(identical(other.discountAmount, _this.discountAmount) || other.discountAmount == _this.discountAmount)&&(identical(other.taxAmount, _this.taxAmount) || other.taxAmount == _this.taxAmount)&&(identical(other.refundAmount, _this.refundAmount) || other.refundAmount == _this.refundAmount)&&const DeepCollectionEquality().equals(other.items, _this.items)&&const DeepCollectionEquality().equals(other.payments, _this.payments));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode {
final _this = this as CustomerOrderDto;
return Object.hashAll([runtimeType,_this.id,_this.orderNumber,_this.outletName,_this.orderType,_this.status,_this.paymentStatus,_this.totalAmount,_this.itemCount,_this.isVoid,_this.isRefund,_this.pointsEarned,_this.coinsEarned,_this.createdAt,_this.tableNumber,_this.subtotal,_this.discountAmount,_this.taxAmount,_this.refundAmount,const DeepCollectionEquality().hash(_this.items),const DeepCollectionEquality().hash(_this.payments)]);
}
@override
String toString() {
final _this = this as CustomerOrderDto;
return 'CustomerOrderDto(id: ${_this.id}, orderNumber: ${_this.orderNumber}, outletName: ${_this.outletName}, orderType: ${_this.orderType}, status: ${_this.status}, paymentStatus: ${_this.paymentStatus}, totalAmount: ${_this.totalAmount}, itemCount: ${_this.itemCount}, isVoid: ${_this.isVoid}, isRefund: ${_this.isRefund}, pointsEarned: ${_this.pointsEarned}, coinsEarned: ${_this.coinsEarned}, createdAt: ${_this.createdAt}, tableNumber: ${_this.tableNumber}, subtotal: ${_this.subtotal}, discountAmount: ${_this.discountAmount}, taxAmount: ${_this.taxAmount}, refundAmount: ${_this.refundAmount}, items: ${_this.items}, payments: ${_this.payments})';
}
}
/// @nodoc
abstract mixin class $CustomerOrderDtoCopyWith<$Res> {
factory $CustomerOrderDtoCopyWith(CustomerOrderDto value, $Res Function(CustomerOrderDto) _then) = _$CustomerOrderDtoCopyWithImpl;
@useResult
$Res call({
@JsonKey(name: 'id') String? id,@JsonKey(name: 'order_number') String? orderNumber,@JsonKey(name: 'outlet_name') String? outletName,@JsonKey(name: 'order_type') String? orderType,@JsonKey(name: 'status') String? status,@JsonKey(name: 'payment_status') String? paymentStatus,@JsonKey(name: 'total_amount') int? totalAmount,@JsonKey(name: 'item_count') int? itemCount,@JsonKey(name: 'is_void') bool? isVoid,@JsonKey(name: 'is_refund') bool? isRefund,@JsonKey(name: 'points_earned') int? pointsEarned,@JsonKey(name: 'coins_earned') int? coinsEarned,@JsonKey(name: 'created_at') String? createdAt,@JsonKey(name: 'table_number') String? tableNumber,@JsonKey(name: 'subtotal') int? subtotal,@JsonKey(name: 'discount_amount') int? discountAmount,@JsonKey(name: 'tax_amount') int? taxAmount,@JsonKey(name: 'refund_amount') int? refundAmount,@JsonKey(name: 'items') List<CustomerOrderItemDto>? items,@JsonKey(name: 'payments') List<CustomerOrderPaymentDto>? payments
});
}
/// @nodoc
class _$CustomerOrderDtoCopyWithImpl<$Res>
implements $CustomerOrderDtoCopyWith<$Res> {
_$CustomerOrderDtoCopyWithImpl(this._self, this._then);
final CustomerOrderDto _self;
final $Res Function(CustomerOrderDto) _then;
/// Create a copy of CustomerOrderDto
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @override $Res call({Object? id = freezed,Object? orderNumber = freezed,Object? outletName = freezed,Object? orderType = freezed,Object? status = freezed,Object? paymentStatus = freezed,Object? totalAmount = freezed,Object? itemCount = freezed,Object? isVoid = freezed,Object? isRefund = freezed,Object? pointsEarned = freezed,Object? coinsEarned = freezed,Object? createdAt = freezed,Object? tableNumber = freezed,Object? subtotal = freezed,Object? discountAmount = freezed,Object? taxAmount = freezed,Object? refundAmount = freezed,Object? items = freezed,Object? payments = freezed,}) {
return _then(CustomerOrderDto(
id: freezed == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
as String?,orderNumber: freezed == orderNumber ? _self.orderNumber : orderNumber // ignore: cast_nullable_to_non_nullable
as String?,outletName: freezed == outletName ? _self.outletName : outletName // ignore: cast_nullable_to_non_nullable
as String?,orderType: freezed == orderType ? _self.orderType : orderType // ignore: cast_nullable_to_non_nullable
as String?,status: freezed == status ? _self.status : status // ignore: cast_nullable_to_non_nullable
as String?,paymentStatus: freezed == paymentStatus ? _self.paymentStatus : paymentStatus // ignore: cast_nullable_to_non_nullable
as String?,totalAmount: freezed == totalAmount ? _self.totalAmount : totalAmount // ignore: cast_nullable_to_non_nullable
as int?,itemCount: freezed == itemCount ? _self.itemCount : itemCount // ignore: cast_nullable_to_non_nullable
as int?,isVoid: freezed == isVoid ? _self.isVoid : isVoid // ignore: cast_nullable_to_non_nullable
as bool?,isRefund: freezed == isRefund ? _self.isRefund : isRefund // ignore: cast_nullable_to_non_nullable
as bool?,pointsEarned: freezed == pointsEarned ? _self.pointsEarned : pointsEarned // ignore: cast_nullable_to_non_nullable
as int?,coinsEarned: freezed == coinsEarned ? _self.coinsEarned : coinsEarned // ignore: cast_nullable_to_non_nullable
as int?,createdAt: freezed == createdAt ? _self.createdAt : createdAt // ignore: cast_nullable_to_non_nullable
as String?,tableNumber: freezed == tableNumber ? _self.tableNumber : tableNumber // ignore: cast_nullable_to_non_nullable
as String?,subtotal: freezed == subtotal ? _self.subtotal : subtotal // ignore: cast_nullable_to_non_nullable
as int?,discountAmount: freezed == discountAmount ? _self.discountAmount : discountAmount // ignore: cast_nullable_to_non_nullable
as int?,taxAmount: freezed == taxAmount ? _self.taxAmount : taxAmount // ignore: cast_nullable_to_non_nullable
as int?,refundAmount: freezed == refundAmount ? _self.refundAmount : refundAmount // ignore: cast_nullable_to_non_nullable
as int?,items: freezed == items ? _self.items : items // ignore: cast_nullable_to_non_nullable
as List<CustomerOrderItemDto>?,payments: freezed == payments ? _self.payments : payments // ignore: cast_nullable_to_non_nullable
as List<CustomerOrderPaymentDto>?,
));
}
}
/// Adds pattern-matching-related methods to [CustomerOrderDto].
extension CustomerOrderDtoPatterns on CustomerOrderDto {
/// 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( _CustomerOrderDto value)? $default,{required TResult orElse(),}){
final _that = this;
switch (_that) {
case _CustomerOrderDto() 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( _CustomerOrderDto value) $default,){
final _that = this;
switch (_that) {
case _CustomerOrderDto():
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( _CustomerOrderDto value)? $default,){
final _that = this;
switch (_that) {
case _CustomerOrderDto() 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: 'id') String? id, @JsonKey(name: 'order_number') String? orderNumber, @JsonKey(name: 'outlet_name') String? outletName, @JsonKey(name: 'order_type') String? orderType, @JsonKey(name: 'status') String? status, @JsonKey(name: 'payment_status') String? paymentStatus, @JsonKey(name: 'total_amount') int? totalAmount, @JsonKey(name: 'item_count') int? itemCount, @JsonKey(name: 'is_void') bool? isVoid, @JsonKey(name: 'is_refund') bool? isRefund, @JsonKey(name: 'points_earned') int? pointsEarned, @JsonKey(name: 'coins_earned') int? coinsEarned, @JsonKey(name: 'created_at') String? createdAt, @JsonKey(name: 'table_number') String? tableNumber, @JsonKey(name: 'subtotal') int? subtotal, @JsonKey(name: 'discount_amount') int? discountAmount, @JsonKey(name: 'tax_amount') int? taxAmount, @JsonKey(name: 'refund_amount') int? refundAmount, @JsonKey(name: 'items') List<CustomerOrderItemDto>? items, @JsonKey(name: 'payments') List<CustomerOrderPaymentDto>? payments)? $default,{required TResult orElse(),}) {final _that = this;
switch (_that) {
case _CustomerOrderDto() when $default != null:
return $default(_that.id,_that.orderNumber,_that.outletName,_that.orderType,_that.status,_that.paymentStatus,_that.totalAmount,_that.itemCount,_that.isVoid,_that.isRefund,_that.pointsEarned,_that.coinsEarned,_that.createdAt,_that.tableNumber,_that.subtotal,_that.discountAmount,_that.taxAmount,_that.refundAmount,_that.items,_that.payments);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: 'id') String? id, @JsonKey(name: 'order_number') String? orderNumber, @JsonKey(name: 'outlet_name') String? outletName, @JsonKey(name: 'order_type') String? orderType, @JsonKey(name: 'status') String? status, @JsonKey(name: 'payment_status') String? paymentStatus, @JsonKey(name: 'total_amount') int? totalAmount, @JsonKey(name: 'item_count') int? itemCount, @JsonKey(name: 'is_void') bool? isVoid, @JsonKey(name: 'is_refund') bool? isRefund, @JsonKey(name: 'points_earned') int? pointsEarned, @JsonKey(name: 'coins_earned') int? coinsEarned, @JsonKey(name: 'created_at') String? createdAt, @JsonKey(name: 'table_number') String? tableNumber, @JsonKey(name: 'subtotal') int? subtotal, @JsonKey(name: 'discount_amount') int? discountAmount, @JsonKey(name: 'tax_amount') int? taxAmount, @JsonKey(name: 'refund_amount') int? refundAmount, @JsonKey(name: 'items') List<CustomerOrderItemDto>? items, @JsonKey(name: 'payments') List<CustomerOrderPaymentDto>? payments) $default,) {final _that = this;
switch (_that) {
case _CustomerOrderDto():
return $default(_that.id,_that.orderNumber,_that.outletName,_that.orderType,_that.status,_that.paymentStatus,_that.totalAmount,_that.itemCount,_that.isVoid,_that.isRefund,_that.pointsEarned,_that.coinsEarned,_that.createdAt,_that.tableNumber,_that.subtotal,_that.discountAmount,_that.taxAmount,_that.refundAmount,_that.items,_that.payments);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: 'id') String? id, @JsonKey(name: 'order_number') String? orderNumber, @JsonKey(name: 'outlet_name') String? outletName, @JsonKey(name: 'order_type') String? orderType, @JsonKey(name: 'status') String? status, @JsonKey(name: 'payment_status') String? paymentStatus, @JsonKey(name: 'total_amount') int? totalAmount, @JsonKey(name: 'item_count') int? itemCount, @JsonKey(name: 'is_void') bool? isVoid, @JsonKey(name: 'is_refund') bool? isRefund, @JsonKey(name: 'points_earned') int? pointsEarned, @JsonKey(name: 'coins_earned') int? coinsEarned, @JsonKey(name: 'created_at') String? createdAt, @JsonKey(name: 'table_number') String? tableNumber, @JsonKey(name: 'subtotal') int? subtotal, @JsonKey(name: 'discount_amount') int? discountAmount, @JsonKey(name: 'tax_amount') int? taxAmount, @JsonKey(name: 'refund_amount') int? refundAmount, @JsonKey(name: 'items') List<CustomerOrderItemDto>? items, @JsonKey(name: 'payments') List<CustomerOrderPaymentDto>? payments)? $default,) {final _that = this;
switch (_that) {
case _CustomerOrderDto() when $default != null:
return $default(_that.id,_that.orderNumber,_that.outletName,_that.orderType,_that.status,_that.paymentStatus,_that.totalAmount,_that.itemCount,_that.isVoid,_that.isRefund,_that.pointsEarned,_that.coinsEarned,_that.createdAt,_that.tableNumber,_that.subtotal,_that.discountAmount,_that.taxAmount,_that.refundAmount,_that.items,_that.payments);case _:
return null;
}
}
}
/// @nodoc
@JsonSerializable()
class _CustomerOrderDto extends CustomerOrderDto {
const _CustomerOrderDto({@JsonKey(name: 'id') this.id, @JsonKey(name: 'order_number') this.orderNumber, @JsonKey(name: 'outlet_name') this.outletName, @JsonKey(name: 'order_type') this.orderType, @JsonKey(name: 'status') this.status, @JsonKey(name: 'payment_status') this.paymentStatus, @JsonKey(name: 'total_amount') this.totalAmount, @JsonKey(name: 'item_count') this.itemCount, @JsonKey(name: 'is_void') this.isVoid, @JsonKey(name: 'is_refund') this.isRefund, @JsonKey(name: 'points_earned') this.pointsEarned, @JsonKey(name: 'coins_earned') this.coinsEarned, @JsonKey(name: 'created_at') this.createdAt, @JsonKey(name: 'table_number') this.tableNumber, @JsonKey(name: 'subtotal') this.subtotal, @JsonKey(name: 'discount_amount') this.discountAmount, @JsonKey(name: 'tax_amount') this.taxAmount, @JsonKey(name: 'refund_amount') this.refundAmount, @JsonKey(name: 'items') List<CustomerOrderItemDto>? items, @JsonKey(name: 'payments') List<CustomerOrderPaymentDto>? payments}): _items = items,_payments = payments,super._();
factory _CustomerOrderDto.fromJson(Map<String, dynamic> json) => _$CustomerOrderDtoFromJson(json);
@override@JsonKey(name: 'id') final String? id;
@override@JsonKey(name: 'order_number') final String? orderNumber;
@override@JsonKey(name: 'outlet_name') final String? outletName;
@override@JsonKey(name: 'order_type') final String? orderType;
@override@JsonKey(name: 'status') final String? status;
@override@JsonKey(name: 'payment_status') final String? paymentStatus;
@override@JsonKey(name: 'total_amount') final int? totalAmount;
@override@JsonKey(name: 'item_count') final int? itemCount;
@override@JsonKey(name: 'is_void') final bool? isVoid;
@override@JsonKey(name: 'is_refund') final bool? isRefund;
@override@JsonKey(name: 'points_earned') final int? pointsEarned;
@override@JsonKey(name: 'coins_earned') final int? coinsEarned;
@override@JsonKey(name: 'created_at') final String? createdAt;
@override@JsonKey(name: 'table_number') final String? tableNumber;
@override@JsonKey(name: 'subtotal') final int? subtotal;
@override@JsonKey(name: 'discount_amount') final int? discountAmount;
@override@JsonKey(name: 'tax_amount') final int? taxAmount;
@override@JsonKey(name: 'refund_amount') final int? refundAmount;
final List<CustomerOrderItemDto>? _items;
@override@JsonKey(name: 'items') List<CustomerOrderItemDto>? get items {
final value = _items;
if (value == null) return null;
if (_items is EqualUnmodifiableListView) return _items;
// ignore: implicit_dynamic_type
return EqualUnmodifiableListView(value);
}
final List<CustomerOrderPaymentDto>? _payments;
@override@JsonKey(name: 'payments') List<CustomerOrderPaymentDto>? get payments {
final value = _payments;
if (value == null) return null;
if (_payments is EqualUnmodifiableListView) return _payments;
// ignore: implicit_dynamic_type
return EqualUnmodifiableListView(value);
}
/// Create a copy of CustomerOrderDto
/// with the given fields replaced by the non-null parameter values.
@override @JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
_$CustomerOrderDtoCopyWith<_CustomerOrderDto> get copyWith => __$CustomerOrderDtoCopyWithImpl<_CustomerOrderDto>(this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$CustomerOrderDtoToJson(this, );
}
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is _CustomerOrderDto&&(identical(other.id, id) || other.id == id)&&(identical(other.orderNumber, orderNumber) || other.orderNumber == orderNumber)&&(identical(other.outletName, outletName) || other.outletName == outletName)&&(identical(other.orderType, orderType) || other.orderType == orderType)&&(identical(other.status, status) || other.status == status)&&(identical(other.paymentStatus, paymentStatus) || other.paymentStatus == paymentStatus)&&(identical(other.totalAmount, totalAmount) || other.totalAmount == totalAmount)&&(identical(other.itemCount, itemCount) || other.itemCount == itemCount)&&(identical(other.isVoid, isVoid) || other.isVoid == isVoid)&&(identical(other.isRefund, isRefund) || other.isRefund == isRefund)&&(identical(other.pointsEarned, pointsEarned) || other.pointsEarned == pointsEarned)&&(identical(other.coinsEarned, coinsEarned) || other.coinsEarned == coinsEarned)&&(identical(other.createdAt, createdAt) || other.createdAt == createdAt)&&(identical(other.tableNumber, tableNumber) || other.tableNumber == tableNumber)&&(identical(other.subtotal, subtotal) || other.subtotal == subtotal)&&(identical(other.discountAmount, discountAmount) || other.discountAmount == discountAmount)&&(identical(other.taxAmount, taxAmount) || other.taxAmount == taxAmount)&&(identical(other.refundAmount, refundAmount) || other.refundAmount == refundAmount)&&const DeepCollectionEquality().equals(other.items, _items)&&const DeepCollectionEquality().equals(other.payments, _payments));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode {
return Object.hashAll([runtimeType,id,orderNumber,outletName,orderType,status,paymentStatus,totalAmount,itemCount,isVoid,isRefund,pointsEarned,coinsEarned,createdAt,tableNumber,subtotal,discountAmount,taxAmount,refundAmount,const DeepCollectionEquality().hash(_items),const DeepCollectionEquality().hash(_payments)]);
}
@override
String toString() {
return 'CustomerOrderDto(id: $id, orderNumber: $orderNumber, outletName: $outletName, orderType: $orderType, status: $status, paymentStatus: $paymentStatus, totalAmount: $totalAmount, itemCount: $itemCount, isVoid: $isVoid, isRefund: $isRefund, pointsEarned: $pointsEarned, coinsEarned: $coinsEarned, createdAt: $createdAt, tableNumber: $tableNumber, subtotal: $subtotal, discountAmount: $discountAmount, taxAmount: $taxAmount, refundAmount: $refundAmount, items: $items, payments: $payments)';
}
}
/// @nodoc
abstract mixin class _$CustomerOrderDtoCopyWith<$Res> implements $CustomerOrderDtoCopyWith<$Res> {
factory _$CustomerOrderDtoCopyWith(_CustomerOrderDto value, $Res Function(_CustomerOrderDto) _then) = __$CustomerOrderDtoCopyWithImpl;
@override @useResult
$Res call({
@JsonKey(name: 'id') String? id,@JsonKey(name: 'order_number') String? orderNumber,@JsonKey(name: 'outlet_name') String? outletName,@JsonKey(name: 'order_type') String? orderType,@JsonKey(name: 'status') String? status,@JsonKey(name: 'payment_status') String? paymentStatus,@JsonKey(name: 'total_amount') int? totalAmount,@JsonKey(name: 'item_count') int? itemCount,@JsonKey(name: 'is_void') bool? isVoid,@JsonKey(name: 'is_refund') bool? isRefund,@JsonKey(name: 'points_earned') int? pointsEarned,@JsonKey(name: 'coins_earned') int? coinsEarned,@JsonKey(name: 'created_at') String? createdAt,@JsonKey(name: 'table_number') String? tableNumber,@JsonKey(name: 'subtotal') int? subtotal,@JsonKey(name: 'discount_amount') int? discountAmount,@JsonKey(name: 'tax_amount') int? taxAmount,@JsonKey(name: 'refund_amount') int? refundAmount,@JsonKey(name: 'items') List<CustomerOrderItemDto>? items,@JsonKey(name: 'payments') List<CustomerOrderPaymentDto>? payments
});
}
/// @nodoc
class __$CustomerOrderDtoCopyWithImpl<$Res>
implements _$CustomerOrderDtoCopyWith<$Res> {
__$CustomerOrderDtoCopyWithImpl(this._self, this._then);
final _CustomerOrderDto _self;
final $Res Function(_CustomerOrderDto) _then;
/// Create a copy of CustomerOrderDto
/// with the given fields replaced by the non-null parameter values.
@override @pragma('vm:prefer-inline') $Res call({Object? id = freezed,Object? orderNumber = freezed,Object? outletName = freezed,Object? orderType = freezed,Object? status = freezed,Object? paymentStatus = freezed,Object? totalAmount = freezed,Object? itemCount = freezed,Object? isVoid = freezed,Object? isRefund = freezed,Object? pointsEarned = freezed,Object? coinsEarned = freezed,Object? createdAt = freezed,Object? tableNumber = freezed,Object? subtotal = freezed,Object? discountAmount = freezed,Object? taxAmount = freezed,Object? refundAmount = freezed,Object? items = freezed,Object? payments = freezed,}) {
return _then(_CustomerOrderDto(
id: freezed == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
as String?,orderNumber: freezed == orderNumber ? _self.orderNumber : orderNumber // ignore: cast_nullable_to_non_nullable
as String?,outletName: freezed == outletName ? _self.outletName : outletName // ignore: cast_nullable_to_non_nullable
as String?,orderType: freezed == orderType ? _self.orderType : orderType // ignore: cast_nullable_to_non_nullable
as String?,status: freezed == status ? _self.status : status // ignore: cast_nullable_to_non_nullable
as String?,paymentStatus: freezed == paymentStatus ? _self.paymentStatus : paymentStatus // ignore: cast_nullable_to_non_nullable
as String?,totalAmount: freezed == totalAmount ? _self.totalAmount : totalAmount // ignore: cast_nullable_to_non_nullable
as int?,itemCount: freezed == itemCount ? _self.itemCount : itemCount // ignore: cast_nullable_to_non_nullable
as int?,isVoid: freezed == isVoid ? _self.isVoid : isVoid // ignore: cast_nullable_to_non_nullable
as bool?,isRefund: freezed == isRefund ? _self.isRefund : isRefund // ignore: cast_nullable_to_non_nullable
as bool?,pointsEarned: freezed == pointsEarned ? _self.pointsEarned : pointsEarned // ignore: cast_nullable_to_non_nullable
as int?,coinsEarned: freezed == coinsEarned ? _self.coinsEarned : coinsEarned // ignore: cast_nullable_to_non_nullable
as int?,createdAt: freezed == createdAt ? _self.createdAt : createdAt // ignore: cast_nullable_to_non_nullable
as String?,tableNumber: freezed == tableNumber ? _self.tableNumber : tableNumber // ignore: cast_nullable_to_non_nullable
as String?,subtotal: freezed == subtotal ? _self.subtotal : subtotal // ignore: cast_nullable_to_non_nullable
as int?,discountAmount: freezed == discountAmount ? _self.discountAmount : discountAmount // ignore: cast_nullable_to_non_nullable
as int?,taxAmount: freezed == taxAmount ? _self.taxAmount : taxAmount // ignore: cast_nullable_to_non_nullable
as int?,refundAmount: freezed == refundAmount ? _self.refundAmount : refundAmount // ignore: cast_nullable_to_non_nullable
as int?,items: freezed == items ? _self._items : items // ignore: cast_nullable_to_non_nullable
as List<CustomerOrderItemDto>?,payments: freezed == payments ? _self._payments : payments // ignore: cast_nullable_to_non_nullable
as List<CustomerOrderPaymentDto>?,
));
}
}
/// @nodoc
mixin _$CustomerOrderItemDto {
@JsonKey(name: 'id') String? get id;@JsonKey(name: 'product_name') String? get productName;@JsonKey(name: 'variant_name') String? get variantName;@JsonKey(name: 'quantity') int? get quantity;@JsonKey(name: 'weight') double? get weight;@JsonKey(name: 'unit_name') String? get unitName;@JsonKey(name: 'unit_price') int? get unitPrice;@JsonKey(name: 'total_price') int? get totalPrice;@JsonKey(name: 'refund_quantity') int? get refundQuantity;
/// Create a copy of CustomerOrderItemDto
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
$CustomerOrderItemDtoCopyWith<CustomerOrderItemDto> get copyWith => _$CustomerOrderItemDtoCopyWithImpl<CustomerOrderItemDto>(this as CustomerOrderItemDto, _$identity);
/// Serializes this CustomerOrderItemDto to a JSON map.
Map<String, dynamic> toJson();
@override
bool operator ==(Object other) {
final _this = this as CustomerOrderItemDto;
return identical(this, other) || (other.runtimeType == runtimeType&&other is CustomerOrderItemDto&&(identical(other.id, _this.id) || other.id == _this.id)&&(identical(other.productName, _this.productName) || other.productName == _this.productName)&&(identical(other.variantName, _this.variantName) || other.variantName == _this.variantName)&&(identical(other.quantity, _this.quantity) || other.quantity == _this.quantity)&&(identical(other.weight, _this.weight) || other.weight == _this.weight)&&(identical(other.unitName, _this.unitName) || other.unitName == _this.unitName)&&(identical(other.unitPrice, _this.unitPrice) || other.unitPrice == _this.unitPrice)&&(identical(other.totalPrice, _this.totalPrice) || other.totalPrice == _this.totalPrice)&&(identical(other.refundQuantity, _this.refundQuantity) || other.refundQuantity == _this.refundQuantity));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode {
final _this = this as CustomerOrderItemDto;
return Object.hash(runtimeType,_this.id,_this.productName,_this.variantName,_this.quantity,_this.weight,_this.unitName,_this.unitPrice,_this.totalPrice,_this.refundQuantity);
}
@override
String toString() {
final _this = this as CustomerOrderItemDto;
return 'CustomerOrderItemDto(id: ${_this.id}, productName: ${_this.productName}, variantName: ${_this.variantName}, quantity: ${_this.quantity}, weight: ${_this.weight}, unitName: ${_this.unitName}, unitPrice: ${_this.unitPrice}, totalPrice: ${_this.totalPrice}, refundQuantity: ${_this.refundQuantity})';
}
}
/// @nodoc
abstract mixin class $CustomerOrderItemDtoCopyWith<$Res> {
factory $CustomerOrderItemDtoCopyWith(CustomerOrderItemDto value, $Res Function(CustomerOrderItemDto) _then) = _$CustomerOrderItemDtoCopyWithImpl;
@useResult
$Res call({
@JsonKey(name: 'id') String? id,@JsonKey(name: 'product_name') String? productName,@JsonKey(name: 'variant_name') String? variantName,@JsonKey(name: 'quantity') int? quantity,@JsonKey(name: 'weight') double? weight,@JsonKey(name: 'unit_name') String? unitName,@JsonKey(name: 'unit_price') int? unitPrice,@JsonKey(name: 'total_price') int? totalPrice,@JsonKey(name: 'refund_quantity') int? refundQuantity
});
}
/// @nodoc
class _$CustomerOrderItemDtoCopyWithImpl<$Res>
implements $CustomerOrderItemDtoCopyWith<$Res> {
_$CustomerOrderItemDtoCopyWithImpl(this._self, this._then);
final CustomerOrderItemDto _self;
final $Res Function(CustomerOrderItemDto) _then;
/// Create a copy of CustomerOrderItemDto
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @override $Res call({Object? id = freezed,Object? productName = freezed,Object? variantName = freezed,Object? quantity = freezed,Object? weight = freezed,Object? unitName = freezed,Object? unitPrice = freezed,Object? totalPrice = freezed,Object? refundQuantity = freezed,}) {
return _then(CustomerOrderItemDto(
id: freezed == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
as String?,productName: freezed == productName ? _self.productName : productName // ignore: cast_nullable_to_non_nullable
as String?,variantName: freezed == variantName ? _self.variantName : variantName // ignore: cast_nullable_to_non_nullable
as String?,quantity: freezed == quantity ? _self.quantity : quantity // ignore: cast_nullable_to_non_nullable
as int?,weight: freezed == weight ? _self.weight : weight // ignore: cast_nullable_to_non_nullable
as double?,unitName: freezed == unitName ? _self.unitName : unitName // ignore: cast_nullable_to_non_nullable
as String?,unitPrice: freezed == unitPrice ? _self.unitPrice : unitPrice // ignore: cast_nullable_to_non_nullable
as int?,totalPrice: freezed == totalPrice ? _self.totalPrice : totalPrice // ignore: cast_nullable_to_non_nullable
as int?,refundQuantity: freezed == refundQuantity ? _self.refundQuantity : refundQuantity // ignore: cast_nullable_to_non_nullable
as int?,
));
}
}
/// Adds pattern-matching-related methods to [CustomerOrderItemDto].
extension CustomerOrderItemDtoPatterns on CustomerOrderItemDto {
/// 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( _CustomerOrderItemDto value)? $default,{required TResult orElse(),}){
final _that = this;
switch (_that) {
case _CustomerOrderItemDto() 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( _CustomerOrderItemDto value) $default,){
final _that = this;
switch (_that) {
case _CustomerOrderItemDto():
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( _CustomerOrderItemDto value)? $default,){
final _that = this;
switch (_that) {
case _CustomerOrderItemDto() 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: 'id') String? id, @JsonKey(name: 'product_name') String? productName, @JsonKey(name: 'variant_name') String? variantName, @JsonKey(name: 'quantity') int? quantity, @JsonKey(name: 'weight') double? weight, @JsonKey(name: 'unit_name') String? unitName, @JsonKey(name: 'unit_price') int? unitPrice, @JsonKey(name: 'total_price') int? totalPrice, @JsonKey(name: 'refund_quantity') int? refundQuantity)? $default,{required TResult orElse(),}) {final _that = this;
switch (_that) {
case _CustomerOrderItemDto() when $default != null:
return $default(_that.id,_that.productName,_that.variantName,_that.quantity,_that.weight,_that.unitName,_that.unitPrice,_that.totalPrice,_that.refundQuantity);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: 'id') String? id, @JsonKey(name: 'product_name') String? productName, @JsonKey(name: 'variant_name') String? variantName, @JsonKey(name: 'quantity') int? quantity, @JsonKey(name: 'weight') double? weight, @JsonKey(name: 'unit_name') String? unitName, @JsonKey(name: 'unit_price') int? unitPrice, @JsonKey(name: 'total_price') int? totalPrice, @JsonKey(name: 'refund_quantity') int? refundQuantity) $default,) {final _that = this;
switch (_that) {
case _CustomerOrderItemDto():
return $default(_that.id,_that.productName,_that.variantName,_that.quantity,_that.weight,_that.unitName,_that.unitPrice,_that.totalPrice,_that.refundQuantity);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: 'id') String? id, @JsonKey(name: 'product_name') String? productName, @JsonKey(name: 'variant_name') String? variantName, @JsonKey(name: 'quantity') int? quantity, @JsonKey(name: 'weight') double? weight, @JsonKey(name: 'unit_name') String? unitName, @JsonKey(name: 'unit_price') int? unitPrice, @JsonKey(name: 'total_price') int? totalPrice, @JsonKey(name: 'refund_quantity') int? refundQuantity)? $default,) {final _that = this;
switch (_that) {
case _CustomerOrderItemDto() when $default != null:
return $default(_that.id,_that.productName,_that.variantName,_that.quantity,_that.weight,_that.unitName,_that.unitPrice,_that.totalPrice,_that.refundQuantity);case _:
return null;
}
}
}
/// @nodoc
@JsonSerializable()
class _CustomerOrderItemDto extends CustomerOrderItemDto {
const _CustomerOrderItemDto({@JsonKey(name: 'id') this.id, @JsonKey(name: 'product_name') this.productName, @JsonKey(name: 'variant_name') this.variantName, @JsonKey(name: 'quantity') this.quantity, @JsonKey(name: 'weight') this.weight, @JsonKey(name: 'unit_name') this.unitName, @JsonKey(name: 'unit_price') this.unitPrice, @JsonKey(name: 'total_price') this.totalPrice, @JsonKey(name: 'refund_quantity') this.refundQuantity}): super._();
factory _CustomerOrderItemDto.fromJson(Map<String, dynamic> json) => _$CustomerOrderItemDtoFromJson(json);
@override@JsonKey(name: 'id') final String? id;
@override@JsonKey(name: 'product_name') final String? productName;
@override@JsonKey(name: 'variant_name') final String? variantName;
@override@JsonKey(name: 'quantity') final int? quantity;
@override@JsonKey(name: 'weight') final double? weight;
@override@JsonKey(name: 'unit_name') final String? unitName;
@override@JsonKey(name: 'unit_price') final int? unitPrice;
@override@JsonKey(name: 'total_price') final int? totalPrice;
@override@JsonKey(name: 'refund_quantity') final int? refundQuantity;
/// Create a copy of CustomerOrderItemDto
/// with the given fields replaced by the non-null parameter values.
@override @JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
_$CustomerOrderItemDtoCopyWith<_CustomerOrderItemDto> get copyWith => __$CustomerOrderItemDtoCopyWithImpl<_CustomerOrderItemDto>(this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$CustomerOrderItemDtoToJson(this, );
}
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is _CustomerOrderItemDto&&(identical(other.id, id) || other.id == id)&&(identical(other.productName, productName) || other.productName == productName)&&(identical(other.variantName, variantName) || other.variantName == variantName)&&(identical(other.quantity, quantity) || other.quantity == quantity)&&(identical(other.weight, weight) || other.weight == weight)&&(identical(other.unitName, unitName) || other.unitName == unitName)&&(identical(other.unitPrice, unitPrice) || other.unitPrice == unitPrice)&&(identical(other.totalPrice, totalPrice) || other.totalPrice == totalPrice)&&(identical(other.refundQuantity, refundQuantity) || other.refundQuantity == refundQuantity));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode {
return Object.hash(runtimeType,id,productName,variantName,quantity,weight,unitName,unitPrice,totalPrice,refundQuantity);
}
@override
String toString() {
return 'CustomerOrderItemDto(id: $id, productName: $productName, variantName: $variantName, quantity: $quantity, weight: $weight, unitName: $unitName, unitPrice: $unitPrice, totalPrice: $totalPrice, refundQuantity: $refundQuantity)';
}
}
/// @nodoc
abstract mixin class _$CustomerOrderItemDtoCopyWith<$Res> implements $CustomerOrderItemDtoCopyWith<$Res> {
factory _$CustomerOrderItemDtoCopyWith(_CustomerOrderItemDto value, $Res Function(_CustomerOrderItemDto) _then) = __$CustomerOrderItemDtoCopyWithImpl;
@override @useResult
$Res call({
@JsonKey(name: 'id') String? id,@JsonKey(name: 'product_name') String? productName,@JsonKey(name: 'variant_name') String? variantName,@JsonKey(name: 'quantity') int? quantity,@JsonKey(name: 'weight') double? weight,@JsonKey(name: 'unit_name') String? unitName,@JsonKey(name: 'unit_price') int? unitPrice,@JsonKey(name: 'total_price') int? totalPrice,@JsonKey(name: 'refund_quantity') int? refundQuantity
});
}
/// @nodoc
class __$CustomerOrderItemDtoCopyWithImpl<$Res>
implements _$CustomerOrderItemDtoCopyWith<$Res> {
__$CustomerOrderItemDtoCopyWithImpl(this._self, this._then);
final _CustomerOrderItemDto _self;
final $Res Function(_CustomerOrderItemDto) _then;
/// Create a copy of CustomerOrderItemDto
/// with the given fields replaced by the non-null parameter values.
@override @pragma('vm:prefer-inline') $Res call({Object? id = freezed,Object? productName = freezed,Object? variantName = freezed,Object? quantity = freezed,Object? weight = freezed,Object? unitName = freezed,Object? unitPrice = freezed,Object? totalPrice = freezed,Object? refundQuantity = freezed,}) {
return _then(_CustomerOrderItemDto(
id: freezed == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
as String?,productName: freezed == productName ? _self.productName : productName // ignore: cast_nullable_to_non_nullable
as String?,variantName: freezed == variantName ? _self.variantName : variantName // ignore: cast_nullable_to_non_nullable
as String?,quantity: freezed == quantity ? _self.quantity : quantity // ignore: cast_nullable_to_non_nullable
as int?,weight: freezed == weight ? _self.weight : weight // ignore: cast_nullable_to_non_nullable
as double?,unitName: freezed == unitName ? _self.unitName : unitName // ignore: cast_nullable_to_non_nullable
as String?,unitPrice: freezed == unitPrice ? _self.unitPrice : unitPrice // ignore: cast_nullable_to_non_nullable
as int?,totalPrice: freezed == totalPrice ? _self.totalPrice : totalPrice // ignore: cast_nullable_to_non_nullable
as int?,refundQuantity: freezed == refundQuantity ? _self.refundQuantity : refundQuantity // ignore: cast_nullable_to_non_nullable
as int?,
));
}
}
/// @nodoc
mixin _$CustomerOrderPaymentDto {
@JsonKey(name: 'id') String? get id;@JsonKey(name: 'method_name') String? get methodName;@JsonKey(name: 'method_type') String? get methodType;@JsonKey(name: 'amount') int? get amount;@JsonKey(name: 'refund_amount') int? get refundAmount;@JsonKey(name: 'points_used') int? get pointsUsed;
/// Create a copy of CustomerOrderPaymentDto
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
$CustomerOrderPaymentDtoCopyWith<CustomerOrderPaymentDto> get copyWith => _$CustomerOrderPaymentDtoCopyWithImpl<CustomerOrderPaymentDto>(this as CustomerOrderPaymentDto, _$identity);
/// Serializes this CustomerOrderPaymentDto to a JSON map.
Map<String, dynamic> toJson();
@override
bool operator ==(Object other) {
final _this = this as CustomerOrderPaymentDto;
return identical(this, other) || (other.runtimeType == runtimeType&&other is CustomerOrderPaymentDto&&(identical(other.id, _this.id) || other.id == _this.id)&&(identical(other.methodName, _this.methodName) || other.methodName == _this.methodName)&&(identical(other.methodType, _this.methodType) || other.methodType == _this.methodType)&&(identical(other.amount, _this.amount) || other.amount == _this.amount)&&(identical(other.refundAmount, _this.refundAmount) || other.refundAmount == _this.refundAmount)&&(identical(other.pointsUsed, _this.pointsUsed) || other.pointsUsed == _this.pointsUsed));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode {
final _this = this as CustomerOrderPaymentDto;
return Object.hash(runtimeType,_this.id,_this.methodName,_this.methodType,_this.amount,_this.refundAmount,_this.pointsUsed);
}
@override
String toString() {
final _this = this as CustomerOrderPaymentDto;
return 'CustomerOrderPaymentDto(id: ${_this.id}, methodName: ${_this.methodName}, methodType: ${_this.methodType}, amount: ${_this.amount}, refundAmount: ${_this.refundAmount}, pointsUsed: ${_this.pointsUsed})';
}
}
/// @nodoc
abstract mixin class $CustomerOrderPaymentDtoCopyWith<$Res> {
factory $CustomerOrderPaymentDtoCopyWith(CustomerOrderPaymentDto value, $Res Function(CustomerOrderPaymentDto) _then) = _$CustomerOrderPaymentDtoCopyWithImpl;
@useResult
$Res call({
@JsonKey(name: 'id') String? id,@JsonKey(name: 'method_name') String? methodName,@JsonKey(name: 'method_type') String? methodType,@JsonKey(name: 'amount') int? amount,@JsonKey(name: 'refund_amount') int? refundAmount,@JsonKey(name: 'points_used') int? pointsUsed
});
}
/// @nodoc
class _$CustomerOrderPaymentDtoCopyWithImpl<$Res>
implements $CustomerOrderPaymentDtoCopyWith<$Res> {
_$CustomerOrderPaymentDtoCopyWithImpl(this._self, this._then);
final CustomerOrderPaymentDto _self;
final $Res Function(CustomerOrderPaymentDto) _then;
/// Create a copy of CustomerOrderPaymentDto
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @override $Res call({Object? id = freezed,Object? methodName = freezed,Object? methodType = freezed,Object? amount = freezed,Object? refundAmount = freezed,Object? pointsUsed = freezed,}) {
return _then(CustomerOrderPaymentDto(
id: freezed == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
as String?,methodName: freezed == methodName ? _self.methodName : methodName // ignore: cast_nullable_to_non_nullable
as String?,methodType: freezed == methodType ? _self.methodType : methodType // ignore: cast_nullable_to_non_nullable
as String?,amount: freezed == amount ? _self.amount : amount // ignore: cast_nullable_to_non_nullable
as int?,refundAmount: freezed == refundAmount ? _self.refundAmount : refundAmount // ignore: cast_nullable_to_non_nullable
as int?,pointsUsed: freezed == pointsUsed ? _self.pointsUsed : pointsUsed // ignore: cast_nullable_to_non_nullable
as int?,
));
}
}
/// Adds pattern-matching-related methods to [CustomerOrderPaymentDto].
extension CustomerOrderPaymentDtoPatterns on CustomerOrderPaymentDto {
/// 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( _CustomerOrderPaymentDto value)? $default,{required TResult orElse(),}){
final _that = this;
switch (_that) {
case _CustomerOrderPaymentDto() 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( _CustomerOrderPaymentDto value) $default,){
final _that = this;
switch (_that) {
case _CustomerOrderPaymentDto():
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( _CustomerOrderPaymentDto value)? $default,){
final _that = this;
switch (_that) {
case _CustomerOrderPaymentDto() 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: 'id') String? id, @JsonKey(name: 'method_name') String? methodName, @JsonKey(name: 'method_type') String? methodType, @JsonKey(name: 'amount') int? amount, @JsonKey(name: 'refund_amount') int? refundAmount, @JsonKey(name: 'points_used') int? pointsUsed)? $default,{required TResult orElse(),}) {final _that = this;
switch (_that) {
case _CustomerOrderPaymentDto() when $default != null:
return $default(_that.id,_that.methodName,_that.methodType,_that.amount,_that.refundAmount,_that.pointsUsed);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: 'id') String? id, @JsonKey(name: 'method_name') String? methodName, @JsonKey(name: 'method_type') String? methodType, @JsonKey(name: 'amount') int? amount, @JsonKey(name: 'refund_amount') int? refundAmount, @JsonKey(name: 'points_used') int? pointsUsed) $default,) {final _that = this;
switch (_that) {
case _CustomerOrderPaymentDto():
return $default(_that.id,_that.methodName,_that.methodType,_that.amount,_that.refundAmount,_that.pointsUsed);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: 'id') String? id, @JsonKey(name: 'method_name') String? methodName, @JsonKey(name: 'method_type') String? methodType, @JsonKey(name: 'amount') int? amount, @JsonKey(name: 'refund_amount') int? refundAmount, @JsonKey(name: 'points_used') int? pointsUsed)? $default,) {final _that = this;
switch (_that) {
case _CustomerOrderPaymentDto() when $default != null:
return $default(_that.id,_that.methodName,_that.methodType,_that.amount,_that.refundAmount,_that.pointsUsed);case _:
return null;
}
}
}
/// @nodoc
@JsonSerializable()
class _CustomerOrderPaymentDto extends CustomerOrderPaymentDto {
const _CustomerOrderPaymentDto({@JsonKey(name: 'id') this.id, @JsonKey(name: 'method_name') this.methodName, @JsonKey(name: 'method_type') this.methodType, @JsonKey(name: 'amount') this.amount, @JsonKey(name: 'refund_amount') this.refundAmount, @JsonKey(name: 'points_used') this.pointsUsed}): super._();
factory _CustomerOrderPaymentDto.fromJson(Map<String, dynamic> json) => _$CustomerOrderPaymentDtoFromJson(json);
@override@JsonKey(name: 'id') final String? id;
@override@JsonKey(name: 'method_name') final String? methodName;
@override@JsonKey(name: 'method_type') final String? methodType;
@override@JsonKey(name: 'amount') final int? amount;
@override@JsonKey(name: 'refund_amount') final int? refundAmount;
@override@JsonKey(name: 'points_used') final int? pointsUsed;
/// Create a copy of CustomerOrderPaymentDto
/// with the given fields replaced by the non-null parameter values.
@override @JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
_$CustomerOrderPaymentDtoCopyWith<_CustomerOrderPaymentDto> get copyWith => __$CustomerOrderPaymentDtoCopyWithImpl<_CustomerOrderPaymentDto>(this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$CustomerOrderPaymentDtoToJson(this, );
}
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is _CustomerOrderPaymentDto&&(identical(other.id, id) || other.id == id)&&(identical(other.methodName, methodName) || other.methodName == methodName)&&(identical(other.methodType, methodType) || other.methodType == methodType)&&(identical(other.amount, amount) || other.amount == amount)&&(identical(other.refundAmount, refundAmount) || other.refundAmount == refundAmount)&&(identical(other.pointsUsed, pointsUsed) || other.pointsUsed == pointsUsed));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode {
return Object.hash(runtimeType,id,methodName,methodType,amount,refundAmount,pointsUsed);
}
@override
String toString() {
return 'CustomerOrderPaymentDto(id: $id, methodName: $methodName, methodType: $methodType, amount: $amount, refundAmount: $refundAmount, pointsUsed: $pointsUsed)';
}
}
/// @nodoc
abstract mixin class _$CustomerOrderPaymentDtoCopyWith<$Res> implements $CustomerOrderPaymentDtoCopyWith<$Res> {
factory _$CustomerOrderPaymentDtoCopyWith(_CustomerOrderPaymentDto value, $Res Function(_CustomerOrderPaymentDto) _then) = __$CustomerOrderPaymentDtoCopyWithImpl;
@override @useResult
$Res call({
@JsonKey(name: 'id') String? id,@JsonKey(name: 'method_name') String? methodName,@JsonKey(name: 'method_type') String? methodType,@JsonKey(name: 'amount') int? amount,@JsonKey(name: 'refund_amount') int? refundAmount,@JsonKey(name: 'points_used') int? pointsUsed
});
}
/// @nodoc
class __$CustomerOrderPaymentDtoCopyWithImpl<$Res>
implements _$CustomerOrderPaymentDtoCopyWith<$Res> {
__$CustomerOrderPaymentDtoCopyWithImpl(this._self, this._then);
final _CustomerOrderPaymentDto _self;
final $Res Function(_CustomerOrderPaymentDto) _then;
/// Create a copy of CustomerOrderPaymentDto
/// with the given fields replaced by the non-null parameter values.
@override @pragma('vm:prefer-inline') $Res call({Object? id = freezed,Object? methodName = freezed,Object? methodType = freezed,Object? amount = freezed,Object? refundAmount = freezed,Object? pointsUsed = freezed,}) {
return _then(_CustomerOrderPaymentDto(
id: freezed == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
as String?,methodName: freezed == methodName ? _self.methodName : methodName // ignore: cast_nullable_to_non_nullable
as String?,methodType: freezed == methodType ? _self.methodType : methodType // ignore: cast_nullable_to_non_nullable
as String?,amount: freezed == amount ? _self.amount : amount // ignore: cast_nullable_to_non_nullable
as int?,refundAmount: freezed == refundAmount ? _self.refundAmount : refundAmount // ignore: cast_nullable_to_non_nullable
as int?,pointsUsed: freezed == pointsUsed ? _self.pointsUsed : pointsUsed // ignore: cast_nullable_to_non_nullable
as int?,
));
}
}
// dart format on