// // AUTO-GENERATED FILE, DO NOT MODIFY! // // ignore_for_file: unused_element import 'package:fintracker_api/src/model/flow_type.dart'; import 'package:copy_with_extension/copy_with_extension.dart'; import 'package:json_annotation/json_annotation.dart'; part 'transaction_out.g.dart'; @CopyWith() @JsonSerializable( checked: true, createToJson: true, disallowUnrecognizedKeys: false, explicitToJson: true, ) class TransactionOut { /// Returns a new [TransactionOut] instance. TransactionOut({ required this.categoryId, required this.comment, required this.date, required this.deleted, required this.flowType, required this.hold, required this.id, required this.income, required this.incomeAccountId, required this.incomeCurrency, required this.incomeRub, required this.isOneOff, required this.mcc, required this.outcome, required this.outcomeAccountId, required this.outcomeCurrency, required this.outcomeRub, required this.payee, required this.payeeCanonical, required this.sourceId, required this.tags, required this.tripId, required this.ts, }); @JsonKey( name: r'category_id', required: true, includeIfNull: true, ) final int? categoryId; @JsonKey( name: r'comment', required: true, includeIfNull: true, ) final String? comment; @JsonKey( name: r'date', required: true, includeIfNull: false, ) final DateTime date; @JsonKey( name: r'deleted', required: true, includeIfNull: false, ) final bool deleted; @JsonKey( name: r'flow_type', required: true, includeIfNull: false, unknownEnumValue: FlowType.unknownDefaultOpenApi, ) final FlowType flowType; @JsonKey( name: r'hold', required: true, includeIfNull: false, ) final bool hold; @JsonKey( name: r'id', required: true, includeIfNull: false, ) final int id; /// decimal as string @JsonKey( name: r'income', required: true, includeIfNull: false, ) final String income; @JsonKey( name: r'income_account_id', required: true, includeIfNull: true, ) final int? incomeAccountId; @JsonKey( name: r'income_currency', required: true, includeIfNull: true, ) final String? incomeCurrency; /// decimal as string @JsonKey( name: r'income_rub', required: true, includeIfNull: true, ) final String? incomeRub; @JsonKey( name: r'is_one_off', required: true, includeIfNull: false, ) final bool isOneOff; @JsonKey( name: r'mcc', required: true, includeIfNull: true, ) final int? mcc; /// decimal as string @JsonKey( name: r'outcome', required: true, includeIfNull: false, ) final String outcome; @JsonKey( name: r'outcome_account_id', required: true, includeIfNull: true, ) final int? outcomeAccountId; @JsonKey( name: r'outcome_currency', required: true, includeIfNull: true, ) final String? outcomeCurrency; /// decimal as string @JsonKey( name: r'outcome_rub', required: true, includeIfNull: true, ) final String? outcomeRub; @JsonKey( name: r'payee', required: true, includeIfNull: true, ) final String? payee; @JsonKey( name: r'payee_canonical', required: true, includeIfNull: true, ) final String? payeeCanonical; @JsonKey( name: r'source_id', required: true, includeIfNull: false, ) final String sourceId; @JsonKey( name: r'tags', required: true, includeIfNull: false, ) final List tags; @JsonKey( name: r'trip_id', required: true, includeIfNull: true, ) final int? tripId; @JsonKey( name: r'ts', required: true, includeIfNull: false, ) final DateTime ts; @override bool operator ==(Object other) => identical(this, other) || other is TransactionOut && other.categoryId == categoryId && other.comment == comment && other.date == date && other.deleted == deleted && other.flowType == flowType && other.hold == hold && other.id == id && other.income == income && other.incomeAccountId == incomeAccountId && other.incomeCurrency == incomeCurrency && other.incomeRub == incomeRub && other.isOneOff == isOneOff && other.mcc == mcc && other.outcome == outcome && other.outcomeAccountId == outcomeAccountId && other.outcomeCurrency == outcomeCurrency && other.outcomeRub == outcomeRub && other.payee == payee && other.payeeCanonical == payeeCanonical && other.sourceId == sourceId && other.tags == tags && other.tripId == tripId && other.ts == ts; @override int get hashCode => (categoryId == null ? 0 : categoryId.hashCode) + (comment == null ? 0 : comment.hashCode) + date.hashCode + deleted.hashCode + flowType.hashCode + hold.hashCode + id.hashCode + income.hashCode + (incomeAccountId == null ? 0 : incomeAccountId.hashCode) + (incomeCurrency == null ? 0 : incomeCurrency.hashCode) + (incomeRub == null ? 0 : incomeRub.hashCode) + isOneOff.hashCode + (mcc == null ? 0 : mcc.hashCode) + outcome.hashCode + (outcomeAccountId == null ? 0 : outcomeAccountId.hashCode) + (outcomeCurrency == null ? 0 : outcomeCurrency.hashCode) + (outcomeRub == null ? 0 : outcomeRub.hashCode) + (payee == null ? 0 : payee.hashCode) + (payeeCanonical == null ? 0 : payeeCanonical.hashCode) + sourceId.hashCode + tags.hashCode + (tripId == null ? 0 : tripId.hashCode) + ts.hashCode; factory TransactionOut.fromJson(Map json) => _$TransactionOutFromJson(json); Map toJson() => _$TransactionOutToJson(this); @override String toString() { return toJson().toString(); } }