// // AUTO-GENERATED FILE, DO NOT MODIFY! // // ignore_for_file: unused_element import 'package:copy_with_extension/copy_with_extension.dart'; import 'package:json_annotation/json_annotation.dart'; part 'goal_out.g.dart'; @CopyWith() @JsonSerializable( checked: true, createToJson: true, disallowUnrecognizedKeys: false, explicitToJson: true, ) class GoalOut { /// Returns a new [GoalOut] instance. GoalOut({ required this.archived, required this.currency, required this.id, required this.monthlyContribution, required this.name, required this.note, required this.scope, required this.targetAmount, required this.targetDate, }); @JsonKey( name: r'archived', required: true, includeIfNull: false, ) final bool archived; @JsonKey( name: r'currency', required: true, includeIfNull: false, ) final String currency; @JsonKey( name: r'id', required: true, includeIfNull: false, ) final int id; /// decimal as string @JsonKey( name: r'monthly_contribution', required: true, includeIfNull: true, ) final String? monthlyContribution; @JsonKey( name: r'name', required: true, includeIfNull: false, ) final String name; @JsonKey( name: r'note', required: true, includeIfNull: true, ) final String? note; @JsonKey( name: r'scope', required: true, includeIfNull: false, ) final String scope; /// decimal as string @JsonKey( name: r'target_amount', required: true, includeIfNull: false, ) final String targetAmount; @JsonKey( name: r'target_date', required: true, includeIfNull: true, ) final DateTime? targetDate; @override bool operator ==(Object other) => identical(this, other) || other is GoalOut && other.archived == archived && other.currency == currency && other.id == id && other.monthlyContribution == monthlyContribution && other.name == name && other.note == note && other.scope == scope && other.targetAmount == targetAmount && other.targetDate == targetDate; @override int get hashCode => archived.hashCode + currency.hashCode + id.hashCode + (monthlyContribution == null ? 0 : monthlyContribution.hashCode) + name.hashCode + (note == null ? 0 : note.hashCode) + scope.hashCode + targetAmount.hashCode + (targetDate == null ? 0 : targetDate.hashCode); factory GoalOut.fromJson(Map json) => _$GoalOutFromJson(json); Map toJson() => _$GoalOutToJson(this); @override String toString() { return toJson().toString(); } }