// // 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 'holding_out.g.dart'; @CopyWith() @JsonSerializable( checked: true, createToJson: true, disallowUnrecognizedKeys: false, explicitToJson: true, ) class HoldingOut { /// Returns a new [HoldingOut] instance. HoldingOut({ required this.accruedInterestRub, required this.assetClass, required this.avgCost, required this.board, required this.costCurrency, required this.costTotalRub, required this.currency, required this.daysHeld, required this.firstBuyDate, required this.incomeRub, required this.instrumentId, required this.ldvEligibleQty, required this.marketPrice, required this.name, required this.priceCurrency, required this.priceDate, required this.priceStatus, required this.qty, required this.realizedPnlRub, required this.ticker, required this.unrealizedPnlNative, required this.unrealizedPnlRub, required this.valueNative, required this.valueRub, required this.weight, required this.xirr, }); /// decimal as string @JsonKey( name: r'accrued_interest_rub', required: true, includeIfNull: true, ) final String? accruedInterestRub; @JsonKey( name: r'asset_class', required: true, includeIfNull: false, ) final String assetClass; /// decimal as string @JsonKey( name: r'avg_cost', required: true, includeIfNull: true, ) final String? avgCost; @JsonKey( name: r'board', required: true, includeIfNull: true, ) final String? board; @JsonKey( name: r'cost_currency', required: true, includeIfNull: true, ) final String? costCurrency; /// decimal as string @JsonKey( name: r'cost_total_rub', required: true, includeIfNull: true, ) final String? costTotalRub; @JsonKey( name: r'currency', required: true, includeIfNull: false, ) final String currency; @JsonKey( name: r'days_held', required: true, includeIfNull: true, ) final int? daysHeld; @JsonKey( name: r'first_buy_date', required: true, includeIfNull: true, ) final DateTime? firstBuyDate; /// decimal as string @JsonKey( name: r'income_rub', required: true, includeIfNull: true, ) final String? incomeRub; @JsonKey( name: r'instrument_id', required: true, includeIfNull: false, ) final int instrumentId; /// decimal as string @JsonKey( name: r'ldv_eligible_qty', required: true, includeIfNull: false, ) final String ldvEligibleQty; /// decimal as string @JsonKey( name: r'market_price', required: true, includeIfNull: true, ) final String? marketPrice; @JsonKey( name: r'name', required: true, includeIfNull: false, ) final String name; @JsonKey( name: r'price_currency', required: true, includeIfNull: true, ) final String? priceCurrency; @JsonKey( name: r'price_date', required: true, includeIfNull: true, ) final DateTime? priceDate; @JsonKey( name: r'price_status', required: true, includeIfNull: false, ) final String priceStatus; /// decimal as string @JsonKey( name: r'qty', required: true, includeIfNull: false, ) final String qty; /// decimal as string @JsonKey( name: r'realized_pnl_rub', required: true, includeIfNull: true, ) final String? realizedPnlRub; @JsonKey( name: r'ticker', required: true, includeIfNull: true, ) final String? ticker; /// decimal as string @JsonKey( name: r'unrealized_pnl_native', required: true, includeIfNull: true, ) final String? unrealizedPnlNative; /// decimal as string @JsonKey( name: r'unrealized_pnl_rub', required: true, includeIfNull: true, ) final String? unrealizedPnlRub; /// decimal as string @JsonKey( name: r'value_native', required: true, includeIfNull: true, ) final String? valueNative; /// decimal as string @JsonKey( name: r'value_rub', required: true, includeIfNull: true, ) final String? valueRub; /// decimal as string @JsonKey( name: r'weight', required: true, includeIfNull: true, ) final String? weight; /// decimal as string @JsonKey( name: r'xirr', required: true, includeIfNull: true, ) final String? xirr; @override bool operator ==(Object other) => identical(this, other) || other is HoldingOut && other.accruedInterestRub == accruedInterestRub && other.assetClass == assetClass && other.avgCost == avgCost && other.board == board && other.costCurrency == costCurrency && other.costTotalRub == costTotalRub && other.currency == currency && other.daysHeld == daysHeld && other.firstBuyDate == firstBuyDate && other.incomeRub == incomeRub && other.instrumentId == instrumentId && other.ldvEligibleQty == ldvEligibleQty && other.marketPrice == marketPrice && other.name == name && other.priceCurrency == priceCurrency && other.priceDate == priceDate && other.priceStatus == priceStatus && other.qty == qty && other.realizedPnlRub == realizedPnlRub && other.ticker == ticker && other.unrealizedPnlNative == unrealizedPnlNative && other.unrealizedPnlRub == unrealizedPnlRub && other.valueNative == valueNative && other.valueRub == valueRub && other.weight == weight && other.xirr == xirr; @override int get hashCode => (accruedInterestRub == null ? 0 : accruedInterestRub.hashCode) + assetClass.hashCode + (avgCost == null ? 0 : avgCost.hashCode) + (board == null ? 0 : board.hashCode) + (costCurrency == null ? 0 : costCurrency.hashCode) + (costTotalRub == null ? 0 : costTotalRub.hashCode) + currency.hashCode + (daysHeld == null ? 0 : daysHeld.hashCode) + (firstBuyDate == null ? 0 : firstBuyDate.hashCode) + (incomeRub == null ? 0 : incomeRub.hashCode) + instrumentId.hashCode + ldvEligibleQty.hashCode + (marketPrice == null ? 0 : marketPrice.hashCode) + name.hashCode + (priceCurrency == null ? 0 : priceCurrency.hashCode) + (priceDate == null ? 0 : priceDate.hashCode) + priceStatus.hashCode + qty.hashCode + (realizedPnlRub == null ? 0 : realizedPnlRub.hashCode) + (ticker == null ? 0 : ticker.hashCode) + (unrealizedPnlNative == null ? 0 : unrealizedPnlNative.hashCode) + (unrealizedPnlRub == null ? 0 : unrealizedPnlRub.hashCode) + (valueNative == null ? 0 : valueNative.hashCode) + (valueRub == null ? 0 : valueRub.hashCode) + (weight == null ? 0 : weight.hashCode) + (xirr == null ? 0 : xirr.hashCode); factory HoldingOut.fromJson(Map json) => _$HoldingOutFromJson(json); Map toJson() => _$HoldingOutToJson(this); @override String toString() { return toJson().toString(); } }