:drunk: Werid miniapp runtime
This commit is contained in:
860
lib/modular/api/payment.freezed.dart
Normal file
860
lib/modular/api/payment.freezed.dart
Normal file
@@ -0,0 +1,860 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
// coverage:ignore-file
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
|
||||
|
||||
part of 'payment.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// FreezedGenerator
|
||||
// **************************************************************************
|
||||
|
||||
// dart format off
|
||||
T _$identity<T>(T value) => value;
|
||||
|
||||
/// @nodoc
|
||||
mixin _$PaymentRequest {
|
||||
|
||||
String get orderId; int get amount; String get currency; String? get remarks; String? get payeeWalletId; String? get pinCode; bool get showOverlay; bool get enableBiometric;
|
||||
/// Create a copy of PaymentRequest
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
$PaymentRequestCopyWith<PaymentRequest> get copyWith => _$PaymentRequestCopyWithImpl<PaymentRequest>(this as PaymentRequest, _$identity);
|
||||
|
||||
/// Serializes this PaymentRequest to a JSON map.
|
||||
Map<String, dynamic> toJson();
|
||||
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is PaymentRequest&&(identical(other.orderId, orderId) || other.orderId == orderId)&&(identical(other.amount, amount) || other.amount == amount)&&(identical(other.currency, currency) || other.currency == currency)&&(identical(other.remarks, remarks) || other.remarks == remarks)&&(identical(other.payeeWalletId, payeeWalletId) || other.payeeWalletId == payeeWalletId)&&(identical(other.pinCode, pinCode) || other.pinCode == pinCode)&&(identical(other.showOverlay, showOverlay) || other.showOverlay == showOverlay)&&(identical(other.enableBiometric, enableBiometric) || other.enableBiometric == enableBiometric));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,orderId,amount,currency,remarks,payeeWalletId,pinCode,showOverlay,enableBiometric);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'PaymentRequest(orderId: $orderId, amount: $amount, currency: $currency, remarks: $remarks, payeeWalletId: $payeeWalletId, pinCode: $pinCode, showOverlay: $showOverlay, enableBiometric: $enableBiometric)';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract mixin class $PaymentRequestCopyWith<$Res> {
|
||||
factory $PaymentRequestCopyWith(PaymentRequest value, $Res Function(PaymentRequest) _then) = _$PaymentRequestCopyWithImpl;
|
||||
@useResult
|
||||
$Res call({
|
||||
String orderId, int amount, String currency, String? remarks, String? payeeWalletId, String? pinCode, bool showOverlay, bool enableBiometric
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
/// @nodoc
|
||||
class _$PaymentRequestCopyWithImpl<$Res>
|
||||
implements $PaymentRequestCopyWith<$Res> {
|
||||
_$PaymentRequestCopyWithImpl(this._self, this._then);
|
||||
|
||||
final PaymentRequest _self;
|
||||
final $Res Function(PaymentRequest) _then;
|
||||
|
||||
/// Create a copy of PaymentRequest
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline') @override $Res call({Object? orderId = null,Object? amount = null,Object? currency = null,Object? remarks = freezed,Object? payeeWalletId = freezed,Object? pinCode = freezed,Object? showOverlay = null,Object? enableBiometric = null,}) {
|
||||
return _then(_self.copyWith(
|
||||
orderId: null == orderId ? _self.orderId : orderId // ignore: cast_nullable_to_non_nullable
|
||||
as String,amount: null == amount ? _self.amount : amount // ignore: cast_nullable_to_non_nullable
|
||||
as int,currency: null == currency ? _self.currency : currency // ignore: cast_nullable_to_non_nullable
|
||||
as String,remarks: freezed == remarks ? _self.remarks : remarks // ignore: cast_nullable_to_non_nullable
|
||||
as String?,payeeWalletId: freezed == payeeWalletId ? _self.payeeWalletId : payeeWalletId // ignore: cast_nullable_to_non_nullable
|
||||
as String?,pinCode: freezed == pinCode ? _self.pinCode : pinCode // ignore: cast_nullable_to_non_nullable
|
||||
as String?,showOverlay: null == showOverlay ? _self.showOverlay : showOverlay // ignore: cast_nullable_to_non_nullable
|
||||
as bool,enableBiometric: null == enableBiometric ? _self.enableBiometric : enableBiometric // ignore: cast_nullable_to_non_nullable
|
||||
as bool,
|
||||
));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/// Adds pattern-matching-related methods to [PaymentRequest].
|
||||
extension PaymentRequestPatterns on PaymentRequest {
|
||||
/// 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( _PaymentRequest value)? $default,{required TResult orElse(),}){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _PaymentRequest() 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( _PaymentRequest value) $default,){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _PaymentRequest():
|
||||
return $default(_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( _PaymentRequest value)? $default,){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _PaymentRequest() 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 orderId, int amount, String currency, String? remarks, String? payeeWalletId, String? pinCode, bool showOverlay, bool enableBiometric)? $default,{required TResult orElse(),}) {final _that = this;
|
||||
switch (_that) {
|
||||
case _PaymentRequest() when $default != null:
|
||||
return $default(_that.orderId,_that.amount,_that.currency,_that.remarks,_that.payeeWalletId,_that.pinCode,_that.showOverlay,_that.enableBiometric);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 orderId, int amount, String currency, String? remarks, String? payeeWalletId, String? pinCode, bool showOverlay, bool enableBiometric) $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _PaymentRequest():
|
||||
return $default(_that.orderId,_that.amount,_that.currency,_that.remarks,_that.payeeWalletId,_that.pinCode,_that.showOverlay,_that.enableBiometric);}
|
||||
}
|
||||
/// 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 orderId, int amount, String currency, String? remarks, String? payeeWalletId, String? pinCode, bool showOverlay, bool enableBiometric)? $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _PaymentRequest() when $default != null:
|
||||
return $default(_that.orderId,_that.amount,_that.currency,_that.remarks,_that.payeeWalletId,_that.pinCode,_that.showOverlay,_that.enableBiometric);case _:
|
||||
return null;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
|
||||
class _PaymentRequest implements PaymentRequest {
|
||||
const _PaymentRequest({required this.orderId, required this.amount, required this.currency, this.remarks, this.payeeWalletId, this.pinCode, this.showOverlay = true, this.enableBiometric = true});
|
||||
factory _PaymentRequest.fromJson(Map<String, dynamic> json) => _$PaymentRequestFromJson(json);
|
||||
|
||||
@override final String orderId;
|
||||
@override final int amount;
|
||||
@override final String currency;
|
||||
@override final String? remarks;
|
||||
@override final String? payeeWalletId;
|
||||
@override final String? pinCode;
|
||||
@override@JsonKey() final bool showOverlay;
|
||||
@override@JsonKey() final bool enableBiometric;
|
||||
|
||||
/// Create a copy of PaymentRequest
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
_$PaymentRequestCopyWith<_PaymentRequest> get copyWith => __$PaymentRequestCopyWithImpl<_PaymentRequest>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
return _$PaymentRequestToJson(this, );
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _PaymentRequest&&(identical(other.orderId, orderId) || other.orderId == orderId)&&(identical(other.amount, amount) || other.amount == amount)&&(identical(other.currency, currency) || other.currency == currency)&&(identical(other.remarks, remarks) || other.remarks == remarks)&&(identical(other.payeeWalletId, payeeWalletId) || other.payeeWalletId == payeeWalletId)&&(identical(other.pinCode, pinCode) || other.pinCode == pinCode)&&(identical(other.showOverlay, showOverlay) || other.showOverlay == showOverlay)&&(identical(other.enableBiometric, enableBiometric) || other.enableBiometric == enableBiometric));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,orderId,amount,currency,remarks,payeeWalletId,pinCode,showOverlay,enableBiometric);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'PaymentRequest(orderId: $orderId, amount: $amount, currency: $currency, remarks: $remarks, payeeWalletId: $payeeWalletId, pinCode: $pinCode, showOverlay: $showOverlay, enableBiometric: $enableBiometric)';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract mixin class _$PaymentRequestCopyWith<$Res> implements $PaymentRequestCopyWith<$Res> {
|
||||
factory _$PaymentRequestCopyWith(_PaymentRequest value, $Res Function(_PaymentRequest) _then) = __$PaymentRequestCopyWithImpl;
|
||||
@override @useResult
|
||||
$Res call({
|
||||
String orderId, int amount, String currency, String? remarks, String? payeeWalletId, String? pinCode, bool showOverlay, bool enableBiometric
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
/// @nodoc
|
||||
class __$PaymentRequestCopyWithImpl<$Res>
|
||||
implements _$PaymentRequestCopyWith<$Res> {
|
||||
__$PaymentRequestCopyWithImpl(this._self, this._then);
|
||||
|
||||
final _PaymentRequest _self;
|
||||
final $Res Function(_PaymentRequest) _then;
|
||||
|
||||
/// Create a copy of PaymentRequest
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @pragma('vm:prefer-inline') $Res call({Object? orderId = null,Object? amount = null,Object? currency = null,Object? remarks = freezed,Object? payeeWalletId = freezed,Object? pinCode = freezed,Object? showOverlay = null,Object? enableBiometric = null,}) {
|
||||
return _then(_PaymentRequest(
|
||||
orderId: null == orderId ? _self.orderId : orderId // ignore: cast_nullable_to_non_nullable
|
||||
as String,amount: null == amount ? _self.amount : amount // ignore: cast_nullable_to_non_nullable
|
||||
as int,currency: null == currency ? _self.currency : currency // ignore: cast_nullable_to_non_nullable
|
||||
as String,remarks: freezed == remarks ? _self.remarks : remarks // ignore: cast_nullable_to_non_nullable
|
||||
as String?,payeeWalletId: freezed == payeeWalletId ? _self.payeeWalletId : payeeWalletId // ignore: cast_nullable_to_non_nullable
|
||||
as String?,pinCode: freezed == pinCode ? _self.pinCode : pinCode // ignore: cast_nullable_to_non_nullable
|
||||
as String?,showOverlay: null == showOverlay ? _self.showOverlay : showOverlay // ignore: cast_nullable_to_non_nullable
|
||||
as bool,enableBiometric: null == enableBiometric ? _self.enableBiometric : enableBiometric // ignore: cast_nullable_to_non_nullable
|
||||
as bool,
|
||||
));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
/// @nodoc
|
||||
mixin _$PaymentResult {
|
||||
|
||||
bool get success; SnWalletOrder? get order; String? get error; String? get errorCode;
|
||||
/// Create a copy of PaymentResult
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
$PaymentResultCopyWith<PaymentResult> get copyWith => _$PaymentResultCopyWithImpl<PaymentResult>(this as PaymentResult, _$identity);
|
||||
|
||||
/// Serializes this PaymentResult to a JSON map.
|
||||
Map<String, dynamic> toJson();
|
||||
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is PaymentResult&&(identical(other.success, success) || other.success == success)&&(identical(other.order, order) || other.order == order)&&(identical(other.error, error) || other.error == error)&&(identical(other.errorCode, errorCode) || other.errorCode == errorCode));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,success,order,error,errorCode);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'PaymentResult(success: $success, order: $order, error: $error, errorCode: $errorCode)';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract mixin class $PaymentResultCopyWith<$Res> {
|
||||
factory $PaymentResultCopyWith(PaymentResult value, $Res Function(PaymentResult) _then) = _$PaymentResultCopyWithImpl;
|
||||
@useResult
|
||||
$Res call({
|
||||
bool success, SnWalletOrder? order, String? error, String? errorCode
|
||||
});
|
||||
|
||||
|
||||
$SnWalletOrderCopyWith<$Res>? get order;
|
||||
|
||||
}
|
||||
/// @nodoc
|
||||
class _$PaymentResultCopyWithImpl<$Res>
|
||||
implements $PaymentResultCopyWith<$Res> {
|
||||
_$PaymentResultCopyWithImpl(this._self, this._then);
|
||||
|
||||
final PaymentResult _self;
|
||||
final $Res Function(PaymentResult) _then;
|
||||
|
||||
/// Create a copy of PaymentResult
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline') @override $Res call({Object? success = null,Object? order = freezed,Object? error = freezed,Object? errorCode = freezed,}) {
|
||||
return _then(_self.copyWith(
|
||||
success: null == success ? _self.success : success // ignore: cast_nullable_to_non_nullable
|
||||
as bool,order: freezed == order ? _self.order : order // ignore: cast_nullable_to_non_nullable
|
||||
as SnWalletOrder?,error: freezed == error ? _self.error : error // ignore: cast_nullable_to_non_nullable
|
||||
as String?,errorCode: freezed == errorCode ? _self.errorCode : errorCode // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
));
|
||||
}
|
||||
/// Create a copy of PaymentResult
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
$SnWalletOrderCopyWith<$Res>? get order {
|
||||
if (_self.order == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return $SnWalletOrderCopyWith<$Res>(_self.order!, (value) {
|
||||
return _then(_self.copyWith(order: value));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// Adds pattern-matching-related methods to [PaymentResult].
|
||||
extension PaymentResultPatterns on PaymentResult {
|
||||
/// 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( _PaymentResult value)? $default,{required TResult orElse(),}){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _PaymentResult() 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( _PaymentResult value) $default,){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _PaymentResult():
|
||||
return $default(_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( _PaymentResult value)? $default,){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _PaymentResult() 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( bool success, SnWalletOrder? order, String? error, String? errorCode)? $default,{required TResult orElse(),}) {final _that = this;
|
||||
switch (_that) {
|
||||
case _PaymentResult() when $default != null:
|
||||
return $default(_that.success,_that.order,_that.error,_that.errorCode);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( bool success, SnWalletOrder? order, String? error, String? errorCode) $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _PaymentResult():
|
||||
return $default(_that.success,_that.order,_that.error,_that.errorCode);}
|
||||
}
|
||||
/// 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( bool success, SnWalletOrder? order, String? error, String? errorCode)? $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _PaymentResult() when $default != null:
|
||||
return $default(_that.success,_that.order,_that.error,_that.errorCode);case _:
|
||||
return null;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
|
||||
class _PaymentResult implements PaymentResult {
|
||||
const _PaymentResult({required this.success, this.order, this.error, this.errorCode});
|
||||
factory _PaymentResult.fromJson(Map<String, dynamic> json) => _$PaymentResultFromJson(json);
|
||||
|
||||
@override final bool success;
|
||||
@override final SnWalletOrder? order;
|
||||
@override final String? error;
|
||||
@override final String? errorCode;
|
||||
|
||||
/// Create a copy of PaymentResult
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
_$PaymentResultCopyWith<_PaymentResult> get copyWith => __$PaymentResultCopyWithImpl<_PaymentResult>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
return _$PaymentResultToJson(this, );
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _PaymentResult&&(identical(other.success, success) || other.success == success)&&(identical(other.order, order) || other.order == order)&&(identical(other.error, error) || other.error == error)&&(identical(other.errorCode, errorCode) || other.errorCode == errorCode));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,success,order,error,errorCode);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'PaymentResult(success: $success, order: $order, error: $error, errorCode: $errorCode)';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract mixin class _$PaymentResultCopyWith<$Res> implements $PaymentResultCopyWith<$Res> {
|
||||
factory _$PaymentResultCopyWith(_PaymentResult value, $Res Function(_PaymentResult) _then) = __$PaymentResultCopyWithImpl;
|
||||
@override @useResult
|
||||
$Res call({
|
||||
bool success, SnWalletOrder? order, String? error, String? errorCode
|
||||
});
|
||||
|
||||
|
||||
@override $SnWalletOrderCopyWith<$Res>? get order;
|
||||
|
||||
}
|
||||
/// @nodoc
|
||||
class __$PaymentResultCopyWithImpl<$Res>
|
||||
implements _$PaymentResultCopyWith<$Res> {
|
||||
__$PaymentResultCopyWithImpl(this._self, this._then);
|
||||
|
||||
final _PaymentResult _self;
|
||||
final $Res Function(_PaymentResult) _then;
|
||||
|
||||
/// Create a copy of PaymentResult
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @pragma('vm:prefer-inline') $Res call({Object? success = null,Object? order = freezed,Object? error = freezed,Object? errorCode = freezed,}) {
|
||||
return _then(_PaymentResult(
|
||||
success: null == success ? _self.success : success // ignore: cast_nullable_to_non_nullable
|
||||
as bool,order: freezed == order ? _self.order : order // ignore: cast_nullable_to_non_nullable
|
||||
as SnWalletOrder?,error: freezed == error ? _self.error : error // ignore: cast_nullable_to_non_nullable
|
||||
as String?,errorCode: freezed == errorCode ? _self.errorCode : errorCode // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
));
|
||||
}
|
||||
|
||||
/// Create a copy of PaymentResult
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
$SnWalletOrderCopyWith<$Res>? get order {
|
||||
if (_self.order == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return $SnWalletOrderCopyWith<$Res>(_self.order!, (value) {
|
||||
return _then(_self.copyWith(order: value));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// @nodoc
|
||||
mixin _$CreateOrderRequest {
|
||||
|
||||
int get amount; String get currency; String? get remarks; String? get payeeWalletId; String? get appIdentifier; Map<String, dynamic> get meta;
|
||||
/// Create a copy of CreateOrderRequest
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
$CreateOrderRequestCopyWith<CreateOrderRequest> get copyWith => _$CreateOrderRequestCopyWithImpl<CreateOrderRequest>(this as CreateOrderRequest, _$identity);
|
||||
|
||||
/// Serializes this CreateOrderRequest to a JSON map.
|
||||
Map<String, dynamic> toJson();
|
||||
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is CreateOrderRequest&&(identical(other.amount, amount) || other.amount == amount)&&(identical(other.currency, currency) || other.currency == currency)&&(identical(other.remarks, remarks) || other.remarks == remarks)&&(identical(other.payeeWalletId, payeeWalletId) || other.payeeWalletId == payeeWalletId)&&(identical(other.appIdentifier, appIdentifier) || other.appIdentifier == appIdentifier)&&const DeepCollectionEquality().equals(other.meta, meta));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,amount,currency,remarks,payeeWalletId,appIdentifier,const DeepCollectionEquality().hash(meta));
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'CreateOrderRequest(amount: $amount, currency: $currency, remarks: $remarks, payeeWalletId: $payeeWalletId, appIdentifier: $appIdentifier, meta: $meta)';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract mixin class $CreateOrderRequestCopyWith<$Res> {
|
||||
factory $CreateOrderRequestCopyWith(CreateOrderRequest value, $Res Function(CreateOrderRequest) _then) = _$CreateOrderRequestCopyWithImpl;
|
||||
@useResult
|
||||
$Res call({
|
||||
int amount, String currency, String? remarks, String? payeeWalletId, String? appIdentifier, Map<String, dynamic> meta
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
/// @nodoc
|
||||
class _$CreateOrderRequestCopyWithImpl<$Res>
|
||||
implements $CreateOrderRequestCopyWith<$Res> {
|
||||
_$CreateOrderRequestCopyWithImpl(this._self, this._then);
|
||||
|
||||
final CreateOrderRequest _self;
|
||||
final $Res Function(CreateOrderRequest) _then;
|
||||
|
||||
/// Create a copy of CreateOrderRequest
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline') @override $Res call({Object? amount = null,Object? currency = null,Object? remarks = freezed,Object? payeeWalletId = freezed,Object? appIdentifier = freezed,Object? meta = null,}) {
|
||||
return _then(_self.copyWith(
|
||||
amount: null == amount ? _self.amount : amount // ignore: cast_nullable_to_non_nullable
|
||||
as int,currency: null == currency ? _self.currency : currency // ignore: cast_nullable_to_non_nullable
|
||||
as String,remarks: freezed == remarks ? _self.remarks : remarks // ignore: cast_nullable_to_non_nullable
|
||||
as String?,payeeWalletId: freezed == payeeWalletId ? _self.payeeWalletId : payeeWalletId // ignore: cast_nullable_to_non_nullable
|
||||
as String?,appIdentifier: freezed == appIdentifier ? _self.appIdentifier : appIdentifier // ignore: cast_nullable_to_non_nullable
|
||||
as String?,meta: null == meta ? _self.meta : meta // ignore: cast_nullable_to_non_nullable
|
||||
as Map<String, dynamic>,
|
||||
));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/// Adds pattern-matching-related methods to [CreateOrderRequest].
|
||||
extension CreateOrderRequestPatterns on CreateOrderRequest {
|
||||
/// 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( _CreateOrderRequest value)? $default,{required TResult orElse(),}){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _CreateOrderRequest() 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( _CreateOrderRequest value) $default,){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _CreateOrderRequest():
|
||||
return $default(_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( _CreateOrderRequest value)? $default,){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _CreateOrderRequest() 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( int amount, String currency, String? remarks, String? payeeWalletId, String? appIdentifier, Map<String, dynamic> meta)? $default,{required TResult orElse(),}) {final _that = this;
|
||||
switch (_that) {
|
||||
case _CreateOrderRequest() when $default != null:
|
||||
return $default(_that.amount,_that.currency,_that.remarks,_that.payeeWalletId,_that.appIdentifier,_that.meta);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( int amount, String currency, String? remarks, String? payeeWalletId, String? appIdentifier, Map<String, dynamic> meta) $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _CreateOrderRequest():
|
||||
return $default(_that.amount,_that.currency,_that.remarks,_that.payeeWalletId,_that.appIdentifier,_that.meta);}
|
||||
}
|
||||
/// 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( int amount, String currency, String? remarks, String? payeeWalletId, String? appIdentifier, Map<String, dynamic> meta)? $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _CreateOrderRequest() when $default != null:
|
||||
return $default(_that.amount,_that.currency,_that.remarks,_that.payeeWalletId,_that.appIdentifier,_that.meta);case _:
|
||||
return null;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
|
||||
class _CreateOrderRequest implements CreateOrderRequest {
|
||||
const _CreateOrderRequest({required this.amount, required this.currency, this.remarks, this.payeeWalletId, this.appIdentifier, final Map<String, dynamic> meta = const {}}): _meta = meta;
|
||||
factory _CreateOrderRequest.fromJson(Map<String, dynamic> json) => _$CreateOrderRequestFromJson(json);
|
||||
|
||||
@override final int amount;
|
||||
@override final String currency;
|
||||
@override final String? remarks;
|
||||
@override final String? payeeWalletId;
|
||||
@override final String? appIdentifier;
|
||||
final Map<String, dynamic> _meta;
|
||||
@override@JsonKey() Map<String, dynamic> get meta {
|
||||
if (_meta is EqualUnmodifiableMapView) return _meta;
|
||||
// ignore: implicit_dynamic_type
|
||||
return EqualUnmodifiableMapView(_meta);
|
||||
}
|
||||
|
||||
|
||||
/// Create a copy of CreateOrderRequest
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
_$CreateOrderRequestCopyWith<_CreateOrderRequest> get copyWith => __$CreateOrderRequestCopyWithImpl<_CreateOrderRequest>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
return _$CreateOrderRequestToJson(this, );
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _CreateOrderRequest&&(identical(other.amount, amount) || other.amount == amount)&&(identical(other.currency, currency) || other.currency == currency)&&(identical(other.remarks, remarks) || other.remarks == remarks)&&(identical(other.payeeWalletId, payeeWalletId) || other.payeeWalletId == payeeWalletId)&&(identical(other.appIdentifier, appIdentifier) || other.appIdentifier == appIdentifier)&&const DeepCollectionEquality().equals(other._meta, _meta));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,amount,currency,remarks,payeeWalletId,appIdentifier,const DeepCollectionEquality().hash(_meta));
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'CreateOrderRequest(amount: $amount, currency: $currency, remarks: $remarks, payeeWalletId: $payeeWalletId, appIdentifier: $appIdentifier, meta: $meta)';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract mixin class _$CreateOrderRequestCopyWith<$Res> implements $CreateOrderRequestCopyWith<$Res> {
|
||||
factory _$CreateOrderRequestCopyWith(_CreateOrderRequest value, $Res Function(_CreateOrderRequest) _then) = __$CreateOrderRequestCopyWithImpl;
|
||||
@override @useResult
|
||||
$Res call({
|
||||
int amount, String currency, String? remarks, String? payeeWalletId, String? appIdentifier, Map<String, dynamic> meta
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
/// @nodoc
|
||||
class __$CreateOrderRequestCopyWithImpl<$Res>
|
||||
implements _$CreateOrderRequestCopyWith<$Res> {
|
||||
__$CreateOrderRequestCopyWithImpl(this._self, this._then);
|
||||
|
||||
final _CreateOrderRequest _self;
|
||||
final $Res Function(_CreateOrderRequest) _then;
|
||||
|
||||
/// Create a copy of CreateOrderRequest
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @pragma('vm:prefer-inline') $Res call({Object? amount = null,Object? currency = null,Object? remarks = freezed,Object? payeeWalletId = freezed,Object? appIdentifier = freezed,Object? meta = null,}) {
|
||||
return _then(_CreateOrderRequest(
|
||||
amount: null == amount ? _self.amount : amount // ignore: cast_nullable_to_non_nullable
|
||||
as int,currency: null == currency ? _self.currency : currency // ignore: cast_nullable_to_non_nullable
|
||||
as String,remarks: freezed == remarks ? _self.remarks : remarks // ignore: cast_nullable_to_non_nullable
|
||||
as String?,payeeWalletId: freezed == payeeWalletId ? _self.payeeWalletId : payeeWalletId // ignore: cast_nullable_to_non_nullable
|
||||
as String?,appIdentifier: freezed == appIdentifier ? _self.appIdentifier : appIdentifier // ignore: cast_nullable_to_non_nullable
|
||||
as String?,meta: null == meta ? _self._meta : meta // ignore: cast_nullable_to_non_nullable
|
||||
as Map<String, dynamic>,
|
||||
));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
// dart format on
|
||||
Reference in New Issue
Block a user