// coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // 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 'card_model.dart'; // ************************************************************************** // FreezedGenerator // ************************************************************************** T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models', ); CardModel _$CardModelFromJson(Map json) { return _CardModel.fromJson(json); } /// @nodoc mixin _$CardModel { int get id => throw _privateConstructorUsedError; @JsonKey(name: 'bank_pan') String get cardNumber => throw _privateConstructorUsedError; @JsonKey(name: 'is_default', fromJson: parseBool) bool get isDefault => throw _privateConstructorUsedError; /// Serializes this CardModel to a JSON map. Map toJson() => throw _privateConstructorUsedError; /// Create a copy of CardModel /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) $CardModelCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $CardModelCopyWith<$Res> { factory $CardModelCopyWith(CardModel value, $Res Function(CardModel) then) = _$CardModelCopyWithImpl<$Res, CardModel>; @useResult $Res call({ int id, @JsonKey(name: 'bank_pan') String cardNumber, @JsonKey(name: 'is_default', fromJson: parseBool) bool isDefault, }); } /// @nodoc class _$CardModelCopyWithImpl<$Res, $Val extends CardModel> implements $CardModelCopyWith<$Res> { _$CardModelCopyWithImpl(this._value, this._then); // ignore: unused_field final $Val _value; // ignore: unused_field final $Res Function($Val) _then; /// Create a copy of CardModel /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override $Res call({ Object? id = null, Object? cardNumber = null, Object? isDefault = null, }) { return _then( _value.copyWith( id: null == id ? _value.id : id // ignore: cast_nullable_to_non_nullable as int, cardNumber: null == cardNumber ? _value.cardNumber : cardNumber // ignore: cast_nullable_to_non_nullable as String, isDefault: null == isDefault ? _value.isDefault : isDefault // ignore: cast_nullable_to_non_nullable as bool, ) as $Val, ); } } /// @nodoc abstract class _$$CardModelImplCopyWith<$Res> implements $CardModelCopyWith<$Res> { factory _$$CardModelImplCopyWith( _$CardModelImpl value, $Res Function(_$CardModelImpl) then, ) = __$$CardModelImplCopyWithImpl<$Res>; @override @useResult $Res call({ int id, @JsonKey(name: 'bank_pan') String cardNumber, @JsonKey(name: 'is_default', fromJson: parseBool) bool isDefault, }); } /// @nodoc class __$$CardModelImplCopyWithImpl<$Res> extends _$CardModelCopyWithImpl<$Res, _$CardModelImpl> implements _$$CardModelImplCopyWith<$Res> { __$$CardModelImplCopyWithImpl( _$CardModelImpl _value, $Res Function(_$CardModelImpl) _then, ) : super(_value, _then); /// Create a copy of CardModel /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override $Res call({ Object? id = null, Object? cardNumber = null, Object? isDefault = null, }) { return _then( _$CardModelImpl( id: null == id ? _value.id : id // ignore: cast_nullable_to_non_nullable as int, cardNumber: null == cardNumber ? _value.cardNumber : cardNumber // ignore: cast_nullable_to_non_nullable as String, isDefault: null == isDefault ? _value.isDefault : isDefault // ignore: cast_nullable_to_non_nullable as bool, ), ); } } /// @nodoc @JsonSerializable() class _$CardModelImpl implements _CardModel { _$CardModelImpl({ required this.id, @JsonKey(name: 'bank_pan') required this.cardNumber, @JsonKey(name: 'is_default', fromJson: parseBool) required this.isDefault, }); factory _$CardModelImpl.fromJson(Map json) => _$$CardModelImplFromJson(json); @override final int id; @override @JsonKey(name: 'bank_pan') final String cardNumber; @override @JsonKey(name: 'is_default', fromJson: parseBool) final bool isDefault; @override String toString() { return 'CardModel(id: $id, cardNumber: $cardNumber, isDefault: $isDefault)'; } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$CardModelImpl && (identical(other.id, id) || other.id == id) && (identical(other.cardNumber, cardNumber) || other.cardNumber == cardNumber) && (identical(other.isDefault, isDefault) || other.isDefault == isDefault)); } @JsonKey(includeFromJson: false, includeToJson: false) @override int get hashCode => Object.hash(runtimeType, id, cardNumber, isDefault); /// Create a copy of CardModel /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') _$$CardModelImplCopyWith<_$CardModelImpl> get copyWith => __$$CardModelImplCopyWithImpl<_$CardModelImpl>(this, _$identity); @override Map toJson() { return _$$CardModelImplToJson(this); } } abstract class _CardModel implements CardModel { factory _CardModel({ required final int id, @JsonKey(name: 'bank_pan') required final String cardNumber, @JsonKey(name: 'is_default', fromJson: parseBool) required final bool isDefault, }) = _$CardModelImpl; factory _CardModel.fromJson(Map json) = _$CardModelImpl.fromJson; @override int get id; @override @JsonKey(name: 'bank_pan') String get cardNumber; @override @JsonKey(name: 'is_default', fromJson: parseBool) bool get isDefault; /// Create a copy of CardModel /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) _$$CardModelImplCopyWith<_$CardModelImpl> get copyWith => throw _privateConstructorUsedError; }