Портфели, создание счетов, ручные события, PATCH инструмента, ScopeCardOut, MetricsStatusOut, логотипы в HoldingOut.
359 lines
5.7 KiB
Dart
359 lines
5.7 KiB
Dart
//
|
|
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
|
//
|
|
|
|
// ignore_for_file: unused_element
|
|
import 'package:fintracker_api/src/model/event_source.dart';
|
|
import 'package:fintracker_api/src/model/account_role.dart';
|
|
import 'package:fintracker_api/src/model/account_kind.dart';
|
|
import 'package:fintracker_api/src/model/broker.dart';
|
|
import 'package:copy_with_extension/copy_with_extension.dart';
|
|
import 'package:json_annotation/json_annotation.dart';
|
|
|
|
part 'account_out.g.dart';
|
|
|
|
|
|
@CopyWith()
|
|
@JsonSerializable(
|
|
checked: true,
|
|
createToJson: true,
|
|
disallowUnrecognizedKeys: false,
|
|
explicitToJson: true,
|
|
)
|
|
class AccountOut {
|
|
/// Returns a new [AccountOut] instance.
|
|
AccountOut({
|
|
|
|
required this.archived,
|
|
|
|
required this.balance,
|
|
|
|
required this.balanceAsOf,
|
|
|
|
required this.broker,
|
|
|
|
required this.creditLimit,
|
|
|
|
required this.currency,
|
|
|
|
required this.disabled,
|
|
|
|
required this.id,
|
|
|
|
required this.includeInNetWorth,
|
|
|
|
required this.kind,
|
|
|
|
required this.mirrorOfAccountId,
|
|
|
|
required this.name,
|
|
|
|
required this.openedAt,
|
|
|
|
required this.primaryEventSource,
|
|
|
|
required this.role,
|
|
|
|
required this.source_,
|
|
|
|
required this.sourceId,
|
|
|
|
required this.startBalance,
|
|
|
|
this.valueRub,
|
|
});
|
|
|
|
@JsonKey(
|
|
|
|
name: r'archived',
|
|
required: true,
|
|
includeIfNull: false,
|
|
)
|
|
|
|
|
|
final bool archived;
|
|
|
|
|
|
|
|
/// decimal as string
|
|
@JsonKey(
|
|
|
|
name: r'balance',
|
|
required: true,
|
|
includeIfNull: true,
|
|
)
|
|
|
|
|
|
final String? balance;
|
|
|
|
|
|
|
|
@JsonKey(
|
|
|
|
name: r'balance_as_of',
|
|
required: true,
|
|
includeIfNull: true,
|
|
)
|
|
|
|
|
|
final DateTime? balanceAsOf;
|
|
|
|
|
|
|
|
@JsonKey(
|
|
|
|
name: r'broker',
|
|
required: true,
|
|
includeIfNull: true,
|
|
unknownEnumValue: Broker.unknownDefaultOpenApi,
|
|
)
|
|
|
|
|
|
final Broker? broker;
|
|
|
|
|
|
|
|
/// decimal as string
|
|
@JsonKey(
|
|
|
|
name: r'credit_limit',
|
|
required: true,
|
|
includeIfNull: true,
|
|
)
|
|
|
|
|
|
final String? creditLimit;
|
|
|
|
|
|
|
|
@JsonKey(
|
|
|
|
name: r'currency',
|
|
required: true,
|
|
includeIfNull: false,
|
|
)
|
|
|
|
|
|
final String currency;
|
|
|
|
|
|
|
|
@JsonKey(
|
|
|
|
name: r'disabled',
|
|
required: true,
|
|
includeIfNull: false,
|
|
)
|
|
|
|
|
|
final bool disabled;
|
|
|
|
|
|
|
|
@JsonKey(
|
|
|
|
name: r'id',
|
|
required: true,
|
|
includeIfNull: false,
|
|
)
|
|
|
|
|
|
final int id;
|
|
|
|
|
|
|
|
@JsonKey(
|
|
|
|
name: r'include_in_net_worth',
|
|
required: true,
|
|
includeIfNull: false,
|
|
)
|
|
|
|
|
|
final bool includeInNetWorth;
|
|
|
|
|
|
|
|
@JsonKey(
|
|
|
|
name: r'kind',
|
|
required: true,
|
|
includeIfNull: false,
|
|
unknownEnumValue: AccountKind.unknownDefaultOpenApi,
|
|
)
|
|
|
|
|
|
final AccountKind kind;
|
|
|
|
|
|
|
|
@JsonKey(
|
|
|
|
name: r'mirror_of_account_id',
|
|
required: true,
|
|
includeIfNull: true,
|
|
)
|
|
|
|
|
|
final int? mirrorOfAccountId;
|
|
|
|
|
|
|
|
@JsonKey(
|
|
|
|
name: r'name',
|
|
required: true,
|
|
includeIfNull: false,
|
|
)
|
|
|
|
|
|
final String name;
|
|
|
|
|
|
|
|
@JsonKey(
|
|
|
|
name: r'opened_at',
|
|
required: true,
|
|
includeIfNull: true,
|
|
)
|
|
|
|
|
|
final DateTime? openedAt;
|
|
|
|
|
|
|
|
@JsonKey(
|
|
|
|
name: r'primary_event_source',
|
|
required: true,
|
|
includeIfNull: true,
|
|
unknownEnumValue: EventSource.unknownDefaultOpenApi,
|
|
)
|
|
|
|
|
|
final EventSource? primaryEventSource;
|
|
|
|
|
|
|
|
@JsonKey(
|
|
|
|
name: r'role',
|
|
required: true,
|
|
includeIfNull: false,
|
|
unknownEnumValue: AccountRole.unknownDefaultOpenApi,
|
|
)
|
|
|
|
|
|
final AccountRole role;
|
|
|
|
|
|
|
|
@JsonKey(
|
|
|
|
name: r'source',
|
|
required: true,
|
|
includeIfNull: false,
|
|
)
|
|
|
|
|
|
final String source_;
|
|
|
|
|
|
|
|
@JsonKey(
|
|
|
|
name: r'source_id',
|
|
required: true,
|
|
includeIfNull: false,
|
|
)
|
|
|
|
|
|
final String sourceId;
|
|
|
|
|
|
|
|
/// decimal as string
|
|
@JsonKey(
|
|
|
|
name: r'start_balance',
|
|
required: true,
|
|
includeIfNull: true,
|
|
)
|
|
|
|
|
|
final String? startBalance;
|
|
|
|
|
|
|
|
/// decimal as string
|
|
@JsonKey(
|
|
|
|
name: r'value_rub',
|
|
required: false,
|
|
includeIfNull: false,
|
|
)
|
|
|
|
|
|
final String? valueRub;
|
|
|
|
|
|
|
|
|
|
|
|
@override
|
|
bool operator ==(Object other) => identical(this, other) || other is AccountOut &&
|
|
other.archived == archived &&
|
|
other.balance == balance &&
|
|
other.balanceAsOf == balanceAsOf &&
|
|
other.broker == broker &&
|
|
other.creditLimit == creditLimit &&
|
|
other.currency == currency &&
|
|
other.disabled == disabled &&
|
|
other.id == id &&
|
|
other.includeInNetWorth == includeInNetWorth &&
|
|
other.kind == kind &&
|
|
other.mirrorOfAccountId == mirrorOfAccountId &&
|
|
other.name == name &&
|
|
other.openedAt == openedAt &&
|
|
other.primaryEventSource == primaryEventSource &&
|
|
other.role == role &&
|
|
other.source_ == source_ &&
|
|
other.sourceId == sourceId &&
|
|
other.startBalance == startBalance &&
|
|
other.valueRub == valueRub;
|
|
|
|
@override
|
|
int get hashCode =>
|
|
archived.hashCode +
|
|
(balance == null ? 0 : balance.hashCode) +
|
|
(balanceAsOf == null ? 0 : balanceAsOf.hashCode) +
|
|
(broker == null ? 0 : broker.hashCode) +
|
|
(creditLimit == null ? 0 : creditLimit.hashCode) +
|
|
currency.hashCode +
|
|
disabled.hashCode +
|
|
id.hashCode +
|
|
includeInNetWorth.hashCode +
|
|
kind.hashCode +
|
|
(mirrorOfAccountId == null ? 0 : mirrorOfAccountId.hashCode) +
|
|
name.hashCode +
|
|
(openedAt == null ? 0 : openedAt.hashCode) +
|
|
(primaryEventSource == null ? 0 : primaryEventSource.hashCode) +
|
|
role.hashCode +
|
|
source_.hashCode +
|
|
sourceId.hashCode +
|
|
(startBalance == null ? 0 : startBalance.hashCode) +
|
|
(valueRub == null ? 0 : valueRub.hashCode);
|
|
|
|
factory AccountOut.fromJson(Map<String, dynamic> json) => _$AccountOutFromJson(json);
|
|
|
|
Map<String, dynamic> toJson() => _$AccountOutToJson(this);
|
|
|
|
@override
|
|
String toString() {
|
|
return toJson().toString();
|
|
}
|
|
|
|
}
|
|
|