Files
enaklo-flutter/lib/domain/auth/auth.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

2018 lines
60 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 'auth.dart';
// **************************************************************************
// FreezedGenerator
// **************************************************************************
// GENERATED CODE - DO NOT MODIFY BY HAND
// dart format off
T _$identity<T>(T value) => value;
/// @nodoc
mixin _$CheckPhone {
CheckPhoneStatus get status; String get message; String get phoneNumber;
/// Create a copy of CheckPhone
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
$CheckPhoneCopyWith<CheckPhone> get copyWith => _$CheckPhoneCopyWithImpl<CheckPhone>(this as CheckPhone, _$identity);
@override
bool operator ==(Object other) {
final _this = this as CheckPhone;
return identical(this, other) || (other.runtimeType == runtimeType&&other is CheckPhone&&(identical(other.status, _this.status) || other.status == _this.status)&&(identical(other.message, _this.message) || other.message == _this.message)&&(identical(other.phoneNumber, _this.phoneNumber) || other.phoneNumber == _this.phoneNumber));
}
@override
int get hashCode {
final _this = this as CheckPhone;
return Object.hash(runtimeType,_this.status,_this.message,_this.phoneNumber);
}
@override
String toString() {
final _this = this as CheckPhone;
return 'CheckPhone(status: ${_this.status}, message: ${_this.message}, phoneNumber: ${_this.phoneNumber})';
}
}
/// @nodoc
abstract mixin class $CheckPhoneCopyWith<$Res> {
factory $CheckPhoneCopyWith(CheckPhone value, $Res Function(CheckPhone) _then) = _$CheckPhoneCopyWithImpl;
@useResult
$Res call({
CheckPhoneStatus status, String message, String phoneNumber
});
}
/// @nodoc
class _$CheckPhoneCopyWithImpl<$Res>
implements $CheckPhoneCopyWith<$Res> {
_$CheckPhoneCopyWithImpl(this._self, this._then);
final CheckPhone _self;
final $Res Function(CheckPhone) _then;
/// Create a copy of CheckPhone
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @override $Res call({Object? status = null,Object? message = null,Object? phoneNumber = null,}) {
return _then(CheckPhone(
status: null == status ? _self.status : status // ignore: cast_nullable_to_non_nullable
as CheckPhoneStatus,message: null == message ? _self.message : message // ignore: cast_nullable_to_non_nullable
as String,phoneNumber: null == phoneNumber ? _self.phoneNumber : phoneNumber // ignore: cast_nullable_to_non_nullable
as String,
));
}
}
/// Adds pattern-matching-related methods to [CheckPhone].
extension CheckPhonePatterns on CheckPhone {
/// 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( _CheckPhone value)? $default,{required TResult orElse(),}){
final _that = this;
switch (_that) {
case _CheckPhone() 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( _CheckPhone value) $default,){
final _that = this;
switch (_that) {
case _CheckPhone():
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( _CheckPhone value)? $default,){
final _that = this;
switch (_that) {
case _CheckPhone() 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( CheckPhoneStatus status, String message, String phoneNumber)? $default,{required TResult orElse(),}) {final _that = this;
switch (_that) {
case _CheckPhone() when $default != null:
return $default(_that.status,_that.message,_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( CheckPhoneStatus status, String message, String phoneNumber) $default,) {final _that = this;
switch (_that) {
case _CheckPhone():
return $default(_that.status,_that.message,_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( CheckPhoneStatus status, String message, String phoneNumber)? $default,) {final _that = this;
switch (_that) {
case _CheckPhone() when $default != null:
return $default(_that.status,_that.message,_that.phoneNumber);case _:
return null;
}
}
}
/// @nodoc
class _CheckPhone implements CheckPhone {
const _CheckPhone({required this.status, required this.message, required this.phoneNumber});
@override final CheckPhoneStatus status;
@override final String message;
@override final String phoneNumber;
/// Create a copy of CheckPhone
/// with the given fields replaced by the non-null parameter values.
@override @JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
_$CheckPhoneCopyWith<_CheckPhone> get copyWith => __$CheckPhoneCopyWithImpl<_CheckPhone>(this, _$identity);
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is _CheckPhone&&(identical(other.status, status) || other.status == status)&&(identical(other.message, message) || other.message == message)&&(identical(other.phoneNumber, phoneNumber) || other.phoneNumber == phoneNumber));
}
@override
int get hashCode {
return Object.hash(runtimeType,status,message,phoneNumber);
}
@override
String toString() {
return 'CheckPhone(status: $status, message: $message, phoneNumber: $phoneNumber)';
}
}
/// @nodoc
abstract mixin class _$CheckPhoneCopyWith<$Res> implements $CheckPhoneCopyWith<$Res> {
factory _$CheckPhoneCopyWith(_CheckPhone value, $Res Function(_CheckPhone) _then) = __$CheckPhoneCopyWithImpl;
@override @useResult
$Res call({
CheckPhoneStatus status, String message, String phoneNumber
});
}
/// @nodoc
class __$CheckPhoneCopyWithImpl<$Res>
implements _$CheckPhoneCopyWith<$Res> {
__$CheckPhoneCopyWithImpl(this._self, this._then);
final _CheckPhone _self;
final $Res Function(_CheckPhone) _then;
/// Create a copy of CheckPhone
/// with the given fields replaced by the non-null parameter values.
@override @pragma('vm:prefer-inline') $Res call({Object? status = null,Object? message = null,Object? phoneNumber = null,}) {
return _then(_CheckPhone(
status: null == status ? _self.status : status // ignore: cast_nullable_to_non_nullable
as CheckPhoneStatus,message: null == message ? _self.message : message // ignore: cast_nullable_to_non_nullable
as String,phoneNumber: null == phoneNumber ? _self.phoneNumber : phoneNumber // ignore: cast_nullable_to_non_nullable
as String,
));
}
}
/// @nodoc
mixin _$Register {
String get status; String get message; String get registrationToken; String get otpToken; int get expiresIn;
/// Create a copy of Register
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
$RegisterCopyWith<Register> get copyWith => _$RegisterCopyWithImpl<Register>(this as Register, _$identity);
@override
bool operator ==(Object other) {
final _this = this as Register;
return identical(this, other) || (other.runtimeType == runtimeType&&other is Register&&(identical(other.status, _this.status) || other.status == _this.status)&&(identical(other.message, _this.message) || other.message == _this.message)&&(identical(other.registrationToken, _this.registrationToken) || other.registrationToken == _this.registrationToken)&&(identical(other.otpToken, _this.otpToken) || other.otpToken == _this.otpToken)&&(identical(other.expiresIn, _this.expiresIn) || other.expiresIn == _this.expiresIn));
}
@override
int get hashCode {
final _this = this as Register;
return Object.hash(runtimeType,_this.status,_this.message,_this.registrationToken,_this.otpToken,_this.expiresIn);
}
@override
String toString() {
final _this = this as Register;
return 'Register(status: ${_this.status}, message: ${_this.message}, registrationToken: ${_this.registrationToken}, otpToken: ${_this.otpToken}, expiresIn: ${_this.expiresIn})';
}
}
/// @nodoc
abstract mixin class $RegisterCopyWith<$Res> {
factory $RegisterCopyWith(Register value, $Res Function(Register) _then) = _$RegisterCopyWithImpl;
@useResult
$Res call({
String status, String message, String registrationToken, String otpToken, int expiresIn
});
}
/// @nodoc
class _$RegisterCopyWithImpl<$Res>
implements $RegisterCopyWith<$Res> {
_$RegisterCopyWithImpl(this._self, this._then);
final Register _self;
final $Res Function(Register) _then;
/// Create a copy of Register
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @override $Res call({Object? status = null,Object? message = null,Object? registrationToken = null,Object? otpToken = null,Object? expiresIn = null,}) {
return _then(Register(
status: null == status ? _self.status : status // ignore: cast_nullable_to_non_nullable
as String,message: null == message ? _self.message : message // ignore: cast_nullable_to_non_nullable
as String,registrationToken: null == registrationToken ? _self.registrationToken : registrationToken // ignore: cast_nullable_to_non_nullable
as String,otpToken: null == otpToken ? _self.otpToken : otpToken // ignore: cast_nullable_to_non_nullable
as String,expiresIn: null == expiresIn ? _self.expiresIn : expiresIn // ignore: cast_nullable_to_non_nullable
as int,
));
}
}
/// Adds pattern-matching-related methods to [Register].
extension RegisterPatterns on Register {
/// 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( _Register value)? $default,{required TResult orElse(),}){
final _that = this;
switch (_that) {
case _Register() 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( _Register value) $default,){
final _that = this;
switch (_that) {
case _Register():
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( _Register value)? $default,){
final _that = this;
switch (_that) {
case _Register() when $default != null:
return $default(_that);case _:
return null;
}
}
/// A variant of `when` that fallback to an `orElse` callback.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case _:
/// return orElse();
/// }
/// ```
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( String status, String message, String registrationToken, String otpToken, int expiresIn)? $default,{required TResult orElse(),}) {final _that = this;
switch (_that) {
case _Register() when $default != null:
return $default(_that.status,_that.message,_that.registrationToken,_that.otpToken,_that.expiresIn);case _:
return orElse();
}
}
/// A `switch`-like method, using callbacks.
///
/// As opposed to `map`, this offers destructuring.
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case Subclass2(:final field2):
/// return ...;
/// }
/// ```
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( String status, String message, String registrationToken, String otpToken, int expiresIn) $default,) {final _that = this;
switch (_that) {
case _Register():
return $default(_that.status,_that.message,_that.registrationToken,_that.otpToken,_that.expiresIn);case _:
throw StateError('Unexpected subclass');
}
}
/// A variant of `when` that fallback to returning `null`
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case _:
/// return null;
/// }
/// ```
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( String status, String message, String registrationToken, String otpToken, int expiresIn)? $default,) {final _that = this;
switch (_that) {
case _Register() when $default != null:
return $default(_that.status,_that.message,_that.registrationToken,_that.otpToken,_that.expiresIn);case _:
return null;
}
}
}
/// @nodoc
class _Register implements Register {
const _Register({required this.status, required this.message, required this.registrationToken, required this.otpToken, required this.expiresIn});
@override final String status;
@override final String message;
@override final String registrationToken;
@override final String otpToken;
@override final int expiresIn;
/// Create a copy of Register
/// with the given fields replaced by the non-null parameter values.
@override @JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
_$RegisterCopyWith<_Register> get copyWith => __$RegisterCopyWithImpl<_Register>(this, _$identity);
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is _Register&&(identical(other.status, status) || other.status == status)&&(identical(other.message, message) || other.message == message)&&(identical(other.registrationToken, registrationToken) || other.registrationToken == registrationToken)&&(identical(other.otpToken, otpToken) || other.otpToken == otpToken)&&(identical(other.expiresIn, expiresIn) || other.expiresIn == expiresIn));
}
@override
int get hashCode {
return Object.hash(runtimeType,status,message,registrationToken,otpToken,expiresIn);
}
@override
String toString() {
return 'Register(status: $status, message: $message, registrationToken: $registrationToken, otpToken: $otpToken, expiresIn: $expiresIn)';
}
}
/// @nodoc
abstract mixin class _$RegisterCopyWith<$Res> implements $RegisterCopyWith<$Res> {
factory _$RegisterCopyWith(_Register value, $Res Function(_Register) _then) = __$RegisterCopyWithImpl;
@override @useResult
$Res call({
String status, String message, String registrationToken, String otpToken, int expiresIn
});
}
/// @nodoc
class __$RegisterCopyWithImpl<$Res>
implements _$RegisterCopyWith<$Res> {
__$RegisterCopyWithImpl(this._self, this._then);
final _Register _self;
final $Res Function(_Register) _then;
/// Create a copy of Register
/// with the given fields replaced by the non-null parameter values.
@override @pragma('vm:prefer-inline') $Res call({Object? status = null,Object? message = null,Object? registrationToken = null,Object? otpToken = null,Object? expiresIn = null,}) {
return _then(_Register(
status: null == status ? _self.status : status // ignore: cast_nullable_to_non_nullable
as String,message: null == message ? _self.message : message // ignore: cast_nullable_to_non_nullable
as String,registrationToken: null == registrationToken ? _self.registrationToken : registrationToken // ignore: cast_nullable_to_non_nullable
as String,otpToken: null == otpToken ? _self.otpToken : otpToken // ignore: cast_nullable_to_non_nullable
as String,expiresIn: null == expiresIn ? _self.expiresIn : expiresIn // ignore: cast_nullable_to_non_nullable
as int,
));
}
}
/// @nodoc
mixin _$Verify {
String get status; String get message; String get registrationToken;
/// Create a copy of Verify
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
$VerifyCopyWith<Verify> get copyWith => _$VerifyCopyWithImpl<Verify>(this as Verify, _$identity);
@override
bool operator ==(Object other) {
final _this = this as Verify;
return identical(this, other) || (other.runtimeType == runtimeType&&other is Verify&&(identical(other.status, _this.status) || other.status == _this.status)&&(identical(other.message, _this.message) || other.message == _this.message)&&(identical(other.registrationToken, _this.registrationToken) || other.registrationToken == _this.registrationToken));
}
@override
int get hashCode {
final _this = this as Verify;
return Object.hash(runtimeType,_this.status,_this.message,_this.registrationToken);
}
@override
String toString() {
final _this = this as Verify;
return 'Verify(status: ${_this.status}, message: ${_this.message}, registrationToken: ${_this.registrationToken})';
}
}
/// @nodoc
abstract mixin class $VerifyCopyWith<$Res> {
factory $VerifyCopyWith(Verify value, $Res Function(Verify) _then) = _$VerifyCopyWithImpl;
@useResult
$Res call({
String status, String message, String registrationToken
});
}
/// @nodoc
class _$VerifyCopyWithImpl<$Res>
implements $VerifyCopyWith<$Res> {
_$VerifyCopyWithImpl(this._self, this._then);
final Verify _self;
final $Res Function(Verify) _then;
/// Create a copy of Verify
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @override $Res call({Object? status = null,Object? message = null,Object? registrationToken = null,}) {
return _then(Verify(
status: null == status ? _self.status : status // ignore: cast_nullable_to_non_nullable
as String,message: null == message ? _self.message : message // ignore: cast_nullable_to_non_nullable
as String,registrationToken: null == registrationToken ? _self.registrationToken : registrationToken // ignore: cast_nullable_to_non_nullable
as String,
));
}
}
/// Adds pattern-matching-related methods to [Verify].
extension VerifyPatterns on Verify {
/// 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( _Verify value)? $default,{required TResult orElse(),}){
final _that = this;
switch (_that) {
case _Verify() 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( _Verify value) $default,){
final _that = this;
switch (_that) {
case _Verify():
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( _Verify value)? $default,){
final _that = this;
switch (_that) {
case _Verify() when $default != null:
return $default(_that);case _:
return null;
}
}
/// A variant of `when` that fallback to an `orElse` callback.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case _:
/// return orElse();
/// }
/// ```
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( String status, String message, String registrationToken)? $default,{required TResult orElse(),}) {final _that = this;
switch (_that) {
case _Verify() when $default != null:
return $default(_that.status,_that.message,_that.registrationToken);case _:
return orElse();
}
}
/// A `switch`-like method, using callbacks.
///
/// As opposed to `map`, this offers destructuring.
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case Subclass2(:final field2):
/// return ...;
/// }
/// ```
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( String status, String message, String registrationToken) $default,) {final _that = this;
switch (_that) {
case _Verify():
return $default(_that.status,_that.message,_that.registrationToken);case _:
throw StateError('Unexpected subclass');
}
}
/// A variant of `when` that fallback to returning `null`
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case _:
/// return null;
/// }
/// ```
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( String status, String message, String registrationToken)? $default,) {final _that = this;
switch (_that) {
case _Verify() when $default != null:
return $default(_that.status,_that.message,_that.registrationToken);case _:
return null;
}
}
}
/// @nodoc
class _Verify implements Verify {
const _Verify({required this.status, required this.message, required this.registrationToken});
@override final String status;
@override final String message;
@override final String registrationToken;
/// Create a copy of Verify
/// with the given fields replaced by the non-null parameter values.
@override @JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
_$VerifyCopyWith<_Verify> get copyWith => __$VerifyCopyWithImpl<_Verify>(this, _$identity);
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is _Verify&&(identical(other.status, status) || other.status == status)&&(identical(other.message, message) || other.message == message)&&(identical(other.registrationToken, registrationToken) || other.registrationToken == registrationToken));
}
@override
int get hashCode {
return Object.hash(runtimeType,status,message,registrationToken);
}
@override
String toString() {
return 'Verify(status: $status, message: $message, registrationToken: $registrationToken)';
}
}
/// @nodoc
abstract mixin class _$VerifyCopyWith<$Res> implements $VerifyCopyWith<$Res> {
factory _$VerifyCopyWith(_Verify value, $Res Function(_Verify) _then) = __$VerifyCopyWithImpl;
@override @useResult
$Res call({
String status, String message, String registrationToken
});
}
/// @nodoc
class __$VerifyCopyWithImpl<$Res>
implements _$VerifyCopyWith<$Res> {
__$VerifyCopyWithImpl(this._self, this._then);
final _Verify _self;
final $Res Function(_Verify) _then;
/// Create a copy of Verify
/// with the given fields replaced by the non-null parameter values.
@override @pragma('vm:prefer-inline') $Res call({Object? status = null,Object? message = null,Object? registrationToken = null,}) {
return _then(_Verify(
status: null == status ? _self.status : status // ignore: cast_nullable_to_non_nullable
as String,message: null == message ? _self.message : message // ignore: cast_nullable_to_non_nullable
as String,registrationToken: null == registrationToken ? _self.registrationToken : registrationToken // ignore: cast_nullable_to_non_nullable
as String,
));
}
}
/// @nodoc
mixin _$Login {
String get status; String get message; String get accessToken; String get refreshToken; User get user;
/// Create a copy of Login
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
$LoginCopyWith<Login> get copyWith => _$LoginCopyWithImpl<Login>(this as Login, _$identity);
@override
bool operator ==(Object other) {
final _this = this as Login;
return identical(this, other) || (other.runtimeType == runtimeType&&other is Login&&(identical(other.status, _this.status) || other.status == _this.status)&&(identical(other.message, _this.message) || other.message == _this.message)&&(identical(other.accessToken, _this.accessToken) || other.accessToken == _this.accessToken)&&(identical(other.refreshToken, _this.refreshToken) || other.refreshToken == _this.refreshToken)&&(identical(other.user, _this.user) || other.user == _this.user));
}
@override
int get hashCode {
final _this = this as Login;
return Object.hash(runtimeType,_this.status,_this.message,_this.accessToken,_this.refreshToken,_this.user);
}
@override
String toString() {
final _this = this as Login;
return 'Login(status: ${_this.status}, message: ${_this.message}, accessToken: ${_this.accessToken}, refreshToken: ${_this.refreshToken}, user: ${_this.user})';
}
}
/// @nodoc
abstract mixin class $LoginCopyWith<$Res> {
factory $LoginCopyWith(Login value, $Res Function(Login) _then) = _$LoginCopyWithImpl;
@useResult
$Res call({
String status, String message, String accessToken, String refreshToken, User user
});
$UserCopyWith<$Res> get user;
}
/// @nodoc
class _$LoginCopyWithImpl<$Res>
implements $LoginCopyWith<$Res> {
_$LoginCopyWithImpl(this._self, this._then);
final Login _self;
final $Res Function(Login) _then;
/// Create a copy of Login
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @override $Res call({Object? status = null,Object? message = null,Object? accessToken = null,Object? refreshToken = null,Object? user = null,}) {
return _then(Login(
status: null == status ? _self.status : status // ignore: cast_nullable_to_non_nullable
as String,message: null == message ? _self.message : message // ignore: cast_nullable_to_non_nullable
as String,accessToken: null == accessToken ? _self.accessToken : accessToken // ignore: cast_nullable_to_non_nullable
as String,refreshToken: null == refreshToken ? _self.refreshToken : refreshToken // ignore: cast_nullable_to_non_nullable
as String,user: null == user ? _self.user : user // ignore: cast_nullable_to_non_nullable
as User,
));
}
/// Create a copy of Login
/// with the given fields replaced by the non-null parameter values.
@override
@pragma('vm:prefer-inline')
$UserCopyWith<$Res> get user {
return $UserCopyWith<$Res>(_self.user, (value) {
return _then(_self.copyWith(user: value));
});
}
}
/// Adds pattern-matching-related methods to [Login].
extension LoginPatterns on Login {
/// 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( _Login value)? $default,{required TResult orElse(),}){
final _that = this;
switch (_that) {
case _Login() 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( _Login value) $default,){
final _that = this;
switch (_that) {
case _Login():
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( _Login value)? $default,){
final _that = this;
switch (_that) {
case _Login() when $default != null:
return $default(_that);case _:
return null;
}
}
/// A variant of `when` that fallback to an `orElse` callback.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case _:
/// return orElse();
/// }
/// ```
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( String status, String message, String accessToken, String refreshToken, User user)? $default,{required TResult orElse(),}) {final _that = this;
switch (_that) {
case _Login() when $default != null:
return $default(_that.status,_that.message,_that.accessToken,_that.refreshToken,_that.user);case _:
return orElse();
}
}
/// A `switch`-like method, using callbacks.
///
/// As opposed to `map`, this offers destructuring.
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case Subclass2(:final field2):
/// return ...;
/// }
/// ```
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( String status, String message, String accessToken, String refreshToken, User user) $default,) {final _that = this;
switch (_that) {
case _Login():
return $default(_that.status,_that.message,_that.accessToken,_that.refreshToken,_that.user);case _:
throw StateError('Unexpected subclass');
}
}
/// A variant of `when` that fallback to returning `null`
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case _:
/// return null;
/// }
/// ```
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( String status, String message, String accessToken, String refreshToken, User user)? $default,) {final _that = this;
switch (_that) {
case _Login() when $default != null:
return $default(_that.status,_that.message,_that.accessToken,_that.refreshToken,_that.user);case _:
return null;
}
}
}
/// @nodoc
class _Login implements Login {
const _Login({required this.status, required this.message, required this.accessToken, required this.refreshToken, required this.user});
@override final String status;
@override final String message;
@override final String accessToken;
@override final String refreshToken;
@override final User user;
/// Create a copy of Login
/// with the given fields replaced by the non-null parameter values.
@override @JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
_$LoginCopyWith<_Login> get copyWith => __$LoginCopyWithImpl<_Login>(this, _$identity);
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is _Login&&(identical(other.status, status) || other.status == status)&&(identical(other.message, message) || other.message == message)&&(identical(other.accessToken, accessToken) || other.accessToken == accessToken)&&(identical(other.refreshToken, refreshToken) || other.refreshToken == refreshToken)&&(identical(other.user, user) || other.user == user));
}
@override
int get hashCode {
return Object.hash(runtimeType,status,message,accessToken,refreshToken,user);
}
@override
String toString() {
return 'Login(status: $status, message: $message, accessToken: $accessToken, refreshToken: $refreshToken, user: $user)';
}
}
/// @nodoc
abstract mixin class _$LoginCopyWith<$Res> implements $LoginCopyWith<$Res> {
factory _$LoginCopyWith(_Login value, $Res Function(_Login) _then) = __$LoginCopyWithImpl;
@override @useResult
$Res call({
String status, String message, String accessToken, String refreshToken, User user
});
@override $UserCopyWith<$Res> get user;
}
/// @nodoc
class __$LoginCopyWithImpl<$Res>
implements _$LoginCopyWith<$Res> {
__$LoginCopyWithImpl(this._self, this._then);
final _Login _self;
final $Res Function(_Login) _then;
/// Create a copy of Login
/// with the given fields replaced by the non-null parameter values.
@override @pragma('vm:prefer-inline') $Res call({Object? status = null,Object? message = null,Object? accessToken = null,Object? refreshToken = null,Object? user = null,}) {
return _then(_Login(
status: null == status ? _self.status : status // ignore: cast_nullable_to_non_nullable
as String,message: null == message ? _self.message : message // ignore: cast_nullable_to_non_nullable
as String,accessToken: null == accessToken ? _self.accessToken : accessToken // ignore: cast_nullable_to_non_nullable
as String,refreshToken: null == refreshToken ? _self.refreshToken : refreshToken // ignore: cast_nullable_to_non_nullable
as String,user: null == user ? _self.user : user // ignore: cast_nullable_to_non_nullable
as User,
));
}
/// Create a copy of Login
/// with the given fields replaced by the non-null parameter values.
@override
@pragma('vm:prefer-inline')
$UserCopyWith<$Res> get user {
return $UserCopyWith<$Res>(_self.user, (value) {
return _then(_self.copyWith(user: value));
});
}
}
/// @nodoc
mixin _$User {
String get id; String get name; String get phoneNumber; String get birthDate;
/// Create a copy of User
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
$UserCopyWith<User> get copyWith => _$UserCopyWithImpl<User>(this as User, _$identity);
@override
bool operator ==(Object other) {
final _this = this as User;
return identical(this, other) || (other.runtimeType == runtimeType&&other is User&&(identical(other.id, _this.id) || other.id == _this.id)&&(identical(other.name, _this.name) || other.name == _this.name)&&(identical(other.phoneNumber, _this.phoneNumber) || other.phoneNumber == _this.phoneNumber)&&(identical(other.birthDate, _this.birthDate) || other.birthDate == _this.birthDate));
}
@override
int get hashCode {
final _this = this as User;
return Object.hash(runtimeType,_this.id,_this.name,_this.phoneNumber,_this.birthDate);
}
@override
String toString() {
final _this = this as User;
return 'User(id: ${_this.id}, name: ${_this.name}, phoneNumber: ${_this.phoneNumber}, birthDate: ${_this.birthDate})';
}
}
/// @nodoc
abstract mixin class $UserCopyWith<$Res> {
factory $UserCopyWith(User value, $Res Function(User) _then) = _$UserCopyWithImpl;
@useResult
$Res call({
String id, String name, String phoneNumber, String birthDate
});
}
/// @nodoc
class _$UserCopyWithImpl<$Res>
implements $UserCopyWith<$Res> {
_$UserCopyWithImpl(this._self, this._then);
final User _self;
final $Res Function(User) _then;
/// Create a copy of User
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @override $Res call({Object? id = null,Object? name = null,Object? phoneNumber = null,Object? birthDate = null,}) {
return _then(User(
id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
as String,name: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable
as String,phoneNumber: null == phoneNumber ? _self.phoneNumber : phoneNumber // ignore: cast_nullable_to_non_nullable
as String,birthDate: null == birthDate ? _self.birthDate : birthDate // ignore: cast_nullable_to_non_nullable
as String,
));
}
}
/// Adds pattern-matching-related methods to [User].
extension UserPatterns on User {
/// 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( _User value)? $default,{required TResult orElse(),}){
final _that = this;
switch (_that) {
case _User() 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( _User value) $default,){
final _that = this;
switch (_that) {
case _User():
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( _User value)? $default,){
final _that = this;
switch (_that) {
case _User() when $default != null:
return $default(_that);case _:
return null;
}
}
/// A variant of `when` that fallback to an `orElse` callback.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case _:
/// return orElse();
/// }
/// ```
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( String id, String name, String phoneNumber, String birthDate)? $default,{required TResult orElse(),}) {final _that = this;
switch (_that) {
case _User() when $default != null:
return $default(_that.id,_that.name,_that.phoneNumber,_that.birthDate);case _:
return orElse();
}
}
/// A `switch`-like method, using callbacks.
///
/// As opposed to `map`, this offers destructuring.
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case Subclass2(:final field2):
/// return ...;
/// }
/// ```
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( String id, String name, String phoneNumber, String birthDate) $default,) {final _that = this;
switch (_that) {
case _User():
return $default(_that.id,_that.name,_that.phoneNumber,_that.birthDate);case _:
throw StateError('Unexpected subclass');
}
}
/// A variant of `when` that fallback to returning `null`
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case _:
/// return null;
/// }
/// ```
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( String id, String name, String phoneNumber, String birthDate)? $default,) {final _that = this;
switch (_that) {
case _User() when $default != null:
return $default(_that.id,_that.name,_that.phoneNumber,_that.birthDate);case _:
return null;
}
}
}
/// @nodoc
class _User implements User {
const _User({required this.id, required this.name, required this.phoneNumber, required this.birthDate});
@override final String id;
@override final String name;
@override final String phoneNumber;
@override final String birthDate;
/// Create a copy of User
/// with the given fields replaced by the non-null parameter values.
@override @JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
_$UserCopyWith<_User> get copyWith => __$UserCopyWithImpl<_User>(this, _$identity);
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is _User&&(identical(other.id, id) || other.id == id)&&(identical(other.name, name) || other.name == name)&&(identical(other.phoneNumber, phoneNumber) || other.phoneNumber == phoneNumber)&&(identical(other.birthDate, birthDate) || other.birthDate == birthDate));
}
@override
int get hashCode {
return Object.hash(runtimeType,id,name,phoneNumber,birthDate);
}
@override
String toString() {
return 'User(id: $id, name: $name, phoneNumber: $phoneNumber, birthDate: $birthDate)';
}
}
/// @nodoc
abstract mixin class _$UserCopyWith<$Res> implements $UserCopyWith<$Res> {
factory _$UserCopyWith(_User value, $Res Function(_User) _then) = __$UserCopyWithImpl;
@override @useResult
$Res call({
String id, String name, String phoneNumber, String birthDate
});
}
/// @nodoc
class __$UserCopyWithImpl<$Res>
implements _$UserCopyWith<$Res> {
__$UserCopyWithImpl(this._self, this._then);
final _User _self;
final $Res Function(_User) _then;
/// Create a copy of User
/// with the given fields replaced by the non-null parameter values.
@override @pragma('vm:prefer-inline') $Res call({Object? id = null,Object? name = null,Object? phoneNumber = null,Object? birthDate = null,}) {
return _then(_User(
id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
as String,name: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable
as String,phoneNumber: null == phoneNumber ? _self.phoneNumber : phoneNumber // ignore: cast_nullable_to_non_nullable
as String,birthDate: null == birthDate ? _self.birthDate : birthDate // ignore: cast_nullable_to_non_nullable
as String,
));
}
}
/// @nodoc
mixin _$Resend {
ResendStatus get status; String get message; String get otpToken; int get expiresIn; int get nextResendIn;
/// Create a copy of Resend
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
$ResendCopyWith<Resend> get copyWith => _$ResendCopyWithImpl<Resend>(this as Resend, _$identity);
@override
bool operator ==(Object other) {
final _this = this as Resend;
return identical(this, other) || (other.runtimeType == runtimeType&&other is Resend&&(identical(other.status, _this.status) || other.status == _this.status)&&(identical(other.message, _this.message) || other.message == _this.message)&&(identical(other.otpToken, _this.otpToken) || other.otpToken == _this.otpToken)&&(identical(other.expiresIn, _this.expiresIn) || other.expiresIn == _this.expiresIn)&&(identical(other.nextResendIn, _this.nextResendIn) || other.nextResendIn == _this.nextResendIn));
}
@override
int get hashCode {
final _this = this as Resend;
return Object.hash(runtimeType,_this.status,_this.message,_this.otpToken,_this.expiresIn,_this.nextResendIn);
}
@override
String toString() {
final _this = this as Resend;
return 'Resend(status: ${_this.status}, message: ${_this.message}, otpToken: ${_this.otpToken}, expiresIn: ${_this.expiresIn}, nextResendIn: ${_this.nextResendIn})';
}
}
/// @nodoc
abstract mixin class $ResendCopyWith<$Res> {
factory $ResendCopyWith(Resend value, $Res Function(Resend) _then) = _$ResendCopyWithImpl;
@useResult
$Res call({
ResendStatus status, String message, String otpToken, int expiresIn, int nextResendIn
});
}
/// @nodoc
class _$ResendCopyWithImpl<$Res>
implements $ResendCopyWith<$Res> {
_$ResendCopyWithImpl(this._self, this._then);
final Resend _self;
final $Res Function(Resend) _then;
/// Create a copy of Resend
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @override $Res call({Object? status = null,Object? message = null,Object? otpToken = null,Object? expiresIn = null,Object? nextResendIn = null,}) {
return _then(Resend(
status: null == status ? _self.status : status // ignore: cast_nullable_to_non_nullable
as ResendStatus,message: null == message ? _self.message : message // ignore: cast_nullable_to_non_nullable
as String,otpToken: null == otpToken ? _self.otpToken : otpToken // ignore: cast_nullable_to_non_nullable
as String,expiresIn: null == expiresIn ? _self.expiresIn : expiresIn // ignore: cast_nullable_to_non_nullable
as int,nextResendIn: null == nextResendIn ? _self.nextResendIn : nextResendIn // ignore: cast_nullable_to_non_nullable
as int,
));
}
}
/// Adds pattern-matching-related methods to [Resend].
extension ResendPatterns on Resend {
/// 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( _Resend value)? $default,{required TResult orElse(),}){
final _that = this;
switch (_that) {
case _Resend() 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( _Resend value) $default,){
final _that = this;
switch (_that) {
case _Resend():
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( _Resend value)? $default,){
final _that = this;
switch (_that) {
case _Resend() 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( ResendStatus status, String message, String otpToken, int expiresIn, int nextResendIn)? $default,{required TResult orElse(),}) {final _that = this;
switch (_that) {
case _Resend() when $default != null:
return $default(_that.status,_that.message,_that.otpToken,_that.expiresIn,_that.nextResendIn);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( ResendStatus status, String message, String otpToken, int expiresIn, int nextResendIn) $default,) {final _that = this;
switch (_that) {
case _Resend():
return $default(_that.status,_that.message,_that.otpToken,_that.expiresIn,_that.nextResendIn);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( ResendStatus status, String message, String otpToken, int expiresIn, int nextResendIn)? $default,) {final _that = this;
switch (_that) {
case _Resend() when $default != null:
return $default(_that.status,_that.message,_that.otpToken,_that.expiresIn,_that.nextResendIn);case _:
return null;
}
}
}
/// @nodoc
class _Resend implements Resend {
const _Resend({required this.status, required this.message, required this.otpToken, required this.expiresIn, required this.nextResendIn});
@override final ResendStatus status;
@override final String message;
@override final String otpToken;
@override final int expiresIn;
@override final int nextResendIn;
/// Create a copy of Resend
/// with the given fields replaced by the non-null parameter values.
@override @JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
_$ResendCopyWith<_Resend> get copyWith => __$ResendCopyWithImpl<_Resend>(this, _$identity);
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is _Resend&&(identical(other.status, status) || other.status == status)&&(identical(other.message, message) || other.message == message)&&(identical(other.otpToken, otpToken) || other.otpToken == otpToken)&&(identical(other.expiresIn, expiresIn) || other.expiresIn == expiresIn)&&(identical(other.nextResendIn, nextResendIn) || other.nextResendIn == nextResendIn));
}
@override
int get hashCode {
return Object.hash(runtimeType,status,message,otpToken,expiresIn,nextResendIn);
}
@override
String toString() {
return 'Resend(status: $status, message: $message, otpToken: $otpToken, expiresIn: $expiresIn, nextResendIn: $nextResendIn)';
}
}
/// @nodoc
abstract mixin class _$ResendCopyWith<$Res> implements $ResendCopyWith<$Res> {
factory _$ResendCopyWith(_Resend value, $Res Function(_Resend) _then) = __$ResendCopyWithImpl;
@override @useResult
$Res call({
ResendStatus status, String message, String otpToken, int expiresIn, int nextResendIn
});
}
/// @nodoc
class __$ResendCopyWithImpl<$Res>
implements _$ResendCopyWith<$Res> {
__$ResendCopyWithImpl(this._self, this._then);
final _Resend _self;
final $Res Function(_Resend) _then;
/// Create a copy of Resend
/// with the given fields replaced by the non-null parameter values.
@override @pragma('vm:prefer-inline') $Res call({Object? status = null,Object? message = null,Object? otpToken = null,Object? expiresIn = null,Object? nextResendIn = null,}) {
return _then(_Resend(
status: null == status ? _self.status : status // ignore: cast_nullable_to_non_nullable
as ResendStatus,message: null == message ? _self.message : message // ignore: cast_nullable_to_non_nullable
as String,otpToken: null == otpToken ? _self.otpToken : otpToken // ignore: cast_nullable_to_non_nullable
as String,expiresIn: null == expiresIn ? _self.expiresIn : expiresIn // ignore: cast_nullable_to_non_nullable
as int,nextResendIn: null == nextResendIn ? _self.nextResendIn : nextResendIn // ignore: cast_nullable_to_non_nullable
as int,
));
}
}
/// @nodoc
mixin _$AuthFailure {
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is AuthFailure);
}
@override
int get hashCode => runtimeType.hashCode;
@override
String toString() {
return 'AuthFailure()';
}
}
/// @nodoc
class $AuthFailureCopyWith<$Res> {
$AuthFailureCopyWith(AuthFailure _, $Res Function(AuthFailure) __);
}
/// Adds pattern-matching-related methods to [AuthFailure].
extension AuthFailurePatterns on AuthFailure {
/// 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( _ServerError value)? serverError,TResult Function( _UnexpectedError value)? unexpectedError,TResult Function( _DynamicErrorMessage value)? dynamicErrorMessage,required TResult orElse(),}){
final _that = this;
switch (_that) {
case _ServerError() when serverError != null:
return serverError(_that);case _UnexpectedError() when unexpectedError != null:
return unexpectedError(_that);case _DynamicErrorMessage() when dynamicErrorMessage != null:
return dynamicErrorMessage(_that);case _:
return orElse();
}
}
/// A `switch`-like method, using callbacks.
///
/// Callbacks receives the raw object, upcasted.
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case final Subclass2 value:
/// return ...;
/// }
/// ```
@optionalTypeArgs TResult map<TResult extends Object?>({required TResult Function( _ServerError value) serverError,required TResult Function( _UnexpectedError value) unexpectedError,required TResult Function( _DynamicErrorMessage value) dynamicErrorMessage,}){
final _that = this;
switch (_that) {
case _ServerError():
return serverError(_that);case _UnexpectedError():
return unexpectedError(_that);case _DynamicErrorMessage():
return dynamicErrorMessage(_that);}
}
/// A variant of `map` that fallback to returning `null`.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case _:
/// return null;
/// }
/// ```
@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>({TResult? Function( _ServerError value)? serverError,TResult? Function( _UnexpectedError value)? unexpectedError,TResult? Function( _DynamicErrorMessage value)? dynamicErrorMessage,}){
final _that = this;
switch (_that) {
case _ServerError() when serverError != null:
return serverError(_that);case _UnexpectedError() when unexpectedError != null:
return unexpectedError(_that);case _DynamicErrorMessage() when dynamicErrorMessage != null:
return dynamicErrorMessage(_that);case _:
return null;
}
}
/// A variant of `when` that fallback to an `orElse` callback.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case _:
/// return orElse();
/// }
/// ```
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>({TResult Function( ApiFailure failure)? serverError,TResult Function()? unexpectedError,TResult Function( String erroMessage)? dynamicErrorMessage,required TResult orElse(),}) {final _that = this;
switch (_that) {
case _ServerError() when serverError != null:
return serverError(_that.failure);case _UnexpectedError() when unexpectedError != null:
return unexpectedError();case _DynamicErrorMessage() when dynamicErrorMessage != null:
return dynamicErrorMessage(_that.erroMessage);case _:
return orElse();
}
}
/// A `switch`-like method, using callbacks.
///
/// As opposed to `map`, this offers destructuring.
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case Subclass2(:final field2):
/// return ...;
/// }
/// ```
@optionalTypeArgs TResult when<TResult extends Object?>({required TResult Function( ApiFailure failure) serverError,required TResult Function() unexpectedError,required TResult Function( String erroMessage) dynamicErrorMessage,}) {final _that = this;
switch (_that) {
case _ServerError():
return serverError(_that.failure);case _UnexpectedError():
return unexpectedError();case _DynamicErrorMessage():
return dynamicErrorMessage(_that.erroMessage);}
}
/// A variant of `when` that fallback to returning `null`
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case _:
/// return null;
/// }
/// ```
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>({TResult? Function( ApiFailure failure)? serverError,TResult? Function()? unexpectedError,TResult? Function( String erroMessage)? dynamicErrorMessage,}) {final _that = this;
switch (_that) {
case _ServerError() when serverError != null:
return serverError(_that.failure);case _UnexpectedError() when unexpectedError != null:
return unexpectedError();case _DynamicErrorMessage() when dynamicErrorMessage != null:
return dynamicErrorMessage(_that.erroMessage);case _:
return null;
}
}
}
/// @nodoc
class _ServerError implements AuthFailure {
const _ServerError(this.failure);
final ApiFailure failure;
/// Create a copy of AuthFailure
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
_$ServerErrorCopyWith<_ServerError> get copyWith => __$ServerErrorCopyWithImpl<_ServerError>(this, _$identity);
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is _ServerError&&(identical(other.failure, failure) || other.failure == failure));
}
@override
int get hashCode {
return Object.hash(runtimeType,failure);
}
@override
String toString() {
return 'AuthFailure.serverError(failure: $failure)';
}
}
/// @nodoc
abstract mixin class _$ServerErrorCopyWith<$Res> implements $AuthFailureCopyWith<$Res> {
factory _$ServerErrorCopyWith(_ServerError value, $Res Function(_ServerError) _then) = __$ServerErrorCopyWithImpl;
@useResult
$Res call({
ApiFailure failure
});
$ApiFailureCopyWith<$Res> get failure;
}
/// @nodoc
class __$ServerErrorCopyWithImpl<$Res>
implements _$ServerErrorCopyWith<$Res> {
__$ServerErrorCopyWithImpl(this._self, this._then);
final _ServerError _self;
final $Res Function(_ServerError) _then;
/// Create a copy of AuthFailure
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') $Res call({Object? failure = null,}) {
return _then(_ServerError(
null == failure ? _self.failure : failure // ignore: cast_nullable_to_non_nullable
as ApiFailure,
));
}
/// Create a copy of AuthFailure
/// with the given fields replaced by the non-null parameter values.
@override
@pragma('vm:prefer-inline')
$ApiFailureCopyWith<$Res> get failure {
return $ApiFailureCopyWith<$Res>(_self.failure, (value) {
return _then(_self.copyWith(failure: value));
});
}
}
/// @nodoc
class _UnexpectedError implements AuthFailure {
const _UnexpectedError();
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is _UnexpectedError);
}
@override
int get hashCode => runtimeType.hashCode;
@override
String toString() {
return 'AuthFailure.unexpectedError()';
}
}
/// @nodoc
class _DynamicErrorMessage implements AuthFailure {
const _DynamicErrorMessage(this.erroMessage);
final String erroMessage;
/// Create a copy of AuthFailure
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
_$DynamicErrorMessageCopyWith<_DynamicErrorMessage> get copyWith => __$DynamicErrorMessageCopyWithImpl<_DynamicErrorMessage>(this, _$identity);
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is _DynamicErrorMessage&&(identical(other.erroMessage, erroMessage) || other.erroMessage == erroMessage));
}
@override
int get hashCode {
return Object.hash(runtimeType,erroMessage);
}
@override
String toString() {
return 'AuthFailure.dynamicErrorMessage(erroMessage: $erroMessage)';
}
}
/// @nodoc
abstract mixin class _$DynamicErrorMessageCopyWith<$Res> implements $AuthFailureCopyWith<$Res> {
factory _$DynamicErrorMessageCopyWith(_DynamicErrorMessage value, $Res Function(_DynamicErrorMessage) _then) = __$DynamicErrorMessageCopyWithImpl;
@useResult
$Res call({
String erroMessage
});
}
/// @nodoc
class __$DynamicErrorMessageCopyWithImpl<$Res>
implements _$DynamicErrorMessageCopyWith<$Res> {
__$DynamicErrorMessageCopyWithImpl(this._self, this._then);
final _DynamicErrorMessage _self;
final $Res Function(_DynamicErrorMessage) _then;
/// Create a copy of AuthFailure
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') $Res call({Object? erroMessage = null,}) {
return _then(_DynamicErrorMessage(
null == erroMessage ? _self.erroMessage : erroMessage // ignore: cast_nullable_to_non_nullable
as String,
));
}
}
// dart format on