// // AUTO-GENERATED FILE, DO NOT MODIFY! // // ignore_for_file: unused_element import 'package:fintracker_api/src/model/returns_out.dart'; import 'package:copy_with_extension/copy_with_extension.dart'; import 'package:json_annotation/json_annotation.dart'; part 'summary_out.g.dart'; @CopyWith() @JsonSerializable( checked: true, createToJson: true, disallowUnrecognizedKeys: false, explicitToJson: true, ) class SummaryOut { /// Returns a new [SummaryOut] instance. SummaryOut({ required this.asOf, required this.cashRub, required this.computedAt, required this.holdingCount, required this.incomeRub, required this.investedNetRub, required this.marketValueRub, required this.pnlTotalRub, required this.realizedPnlRub, required this.returns, required this.scope, required this.staleCount, required this.totalRub, required this.unpricedCount, }); @JsonKey( name: r'as_of', required: true, includeIfNull: true, ) final DateTime? asOf; /// decimal as string @JsonKey( name: r'cash_rub', required: true, includeIfNull: false, ) final String cashRub; @JsonKey( name: r'computed_at', required: true, includeIfNull: true, ) final DateTime? computedAt; @JsonKey( name: r'holding_count', required: true, includeIfNull: false, ) final int holdingCount; /// decimal as string @JsonKey( name: r'income_rub', required: true, includeIfNull: false, ) final String incomeRub; /// decimal as string @JsonKey( name: r'invested_net_rub', required: true, includeIfNull: false, ) final String investedNetRub; /// decimal as string @JsonKey( name: r'market_value_rub', required: true, includeIfNull: false, ) final String marketValueRub; /// decimal as string @JsonKey( name: r'pnl_total_rub', required: true, includeIfNull: true, ) final String? pnlTotalRub; /// decimal as string @JsonKey( name: r'realized_pnl_rub', required: true, includeIfNull: false, ) final String realizedPnlRub; @JsonKey( name: r'returns', required: true, includeIfNull: false, ) final List returns; @JsonKey( name: r'scope', required: true, includeIfNull: false, ) final String scope; @JsonKey( name: r'stale_count', required: true, includeIfNull: false, ) final int staleCount; /// decimal as string @JsonKey( name: r'total_rub', required: true, includeIfNull: false, ) final String totalRub; @JsonKey( name: r'unpriced_count', required: true, includeIfNull: false, ) final int unpricedCount; @override bool operator ==(Object other) => identical(this, other) || other is SummaryOut && other.asOf == asOf && other.cashRub == cashRub && other.computedAt == computedAt && other.holdingCount == holdingCount && other.incomeRub == incomeRub && other.investedNetRub == investedNetRub && other.marketValueRub == marketValueRub && other.pnlTotalRub == pnlTotalRub && other.realizedPnlRub == realizedPnlRub && other.returns == returns && other.scope == scope && other.staleCount == staleCount && other.totalRub == totalRub && other.unpricedCount == unpricedCount; @override int get hashCode => (asOf == null ? 0 : asOf.hashCode) + cashRub.hashCode + (computedAt == null ? 0 : computedAt.hashCode) + holdingCount.hashCode + incomeRub.hashCode + investedNetRub.hashCode + marketValueRub.hashCode + (pnlTotalRub == null ? 0 : pnlTotalRub.hashCode) + realizedPnlRub.hashCode + returns.hashCode + scope.hashCode + staleCount.hashCode + totalRub.hashCode + unpricedCount.hashCode; factory SummaryOut.fromJson(Map json) => _$SummaryOutFromJson(json); Map toJson() => _$SummaryOutToJson(this); @override String toString() { return toJson().toString(); } }