just gen-client — покрывает links, cashflow-broker, ручные цены, imports/pending, goals/income/rebalance/tax/benchmarks.
242 lines
8.1 KiB
Dart
242 lines
8.1 KiB
Dart
// GENERATED CODE - DO NOT MODIFY BY HAND
|
|
|
|
part of 'benchmark_out.dart';
|
|
|
|
// **************************************************************************
|
|
// CopyWithGenerator
|
|
// **************************************************************************
|
|
|
|
abstract class _$BenchmarkOutCWProxy {
|
|
BenchmarkOut code(String code);
|
|
|
|
BenchmarkOut currency(String currency);
|
|
|
|
BenchmarkOut historyFrom(DateTime? historyFrom);
|
|
|
|
BenchmarkOut historyTo(DateTime? historyTo);
|
|
|
|
BenchmarkOut id(int id);
|
|
|
|
BenchmarkOut instrumentId(int? instrumentId);
|
|
|
|
BenchmarkOut isActive(bool isActive);
|
|
|
|
BenchmarkOut isDefault(bool isDefault);
|
|
|
|
BenchmarkOut kind(String kind);
|
|
|
|
BenchmarkOut name(String name);
|
|
|
|
BenchmarkOut source_(String source_);
|
|
|
|
/// This function **does support** nullification of nullable fields. All `null` values passed to `non-nullable` fields will be ignored. You can also use `BenchmarkOut(...).copyWith.fieldName(...)` to override fields one at a time with nullification support.
|
|
///
|
|
/// Usage
|
|
/// ```dart
|
|
/// BenchmarkOut(...).copyWith(id: 12, name: "My name")
|
|
/// ````
|
|
BenchmarkOut call({
|
|
String code,
|
|
String currency,
|
|
DateTime? historyFrom,
|
|
DateTime? historyTo,
|
|
int id,
|
|
int? instrumentId,
|
|
bool isActive,
|
|
bool isDefault,
|
|
String kind,
|
|
String name,
|
|
String source_,
|
|
});
|
|
}
|
|
|
|
/// Proxy class for `copyWith` functionality. This is a callable class and can be used as follows: `instanceOfBenchmarkOut.copyWith(...)`. Additionally contains functions for specific fields e.g. `instanceOfBenchmarkOut.copyWith.fieldName(...)`
|
|
class _$BenchmarkOutCWProxyImpl implements _$BenchmarkOutCWProxy {
|
|
const _$BenchmarkOutCWProxyImpl(this._value);
|
|
|
|
final BenchmarkOut _value;
|
|
|
|
@override
|
|
BenchmarkOut code(String code) => this(code: code);
|
|
|
|
@override
|
|
BenchmarkOut currency(String currency) => this(currency: currency);
|
|
|
|
@override
|
|
BenchmarkOut historyFrom(DateTime? historyFrom) =>
|
|
this(historyFrom: historyFrom);
|
|
|
|
@override
|
|
BenchmarkOut historyTo(DateTime? historyTo) => this(historyTo: historyTo);
|
|
|
|
@override
|
|
BenchmarkOut id(int id) => this(id: id);
|
|
|
|
@override
|
|
BenchmarkOut instrumentId(int? instrumentId) =>
|
|
this(instrumentId: instrumentId);
|
|
|
|
@override
|
|
BenchmarkOut isActive(bool isActive) => this(isActive: isActive);
|
|
|
|
@override
|
|
BenchmarkOut isDefault(bool isDefault) => this(isDefault: isDefault);
|
|
|
|
@override
|
|
BenchmarkOut kind(String kind) => this(kind: kind);
|
|
|
|
@override
|
|
BenchmarkOut name(String name) => this(name: name);
|
|
|
|
@override
|
|
BenchmarkOut source_(String source_) => this(source_: source_);
|
|
|
|
@override
|
|
/// This function **does support** nullification of nullable fields. All `null` values passed to `non-nullable` fields will be ignored. You can also use `BenchmarkOut(...).copyWith.fieldName(...)` to override fields one at a time with nullification support.
|
|
///
|
|
/// Usage
|
|
/// ```dart
|
|
/// BenchmarkOut(...).copyWith(id: 12, name: "My name")
|
|
/// ````
|
|
BenchmarkOut call({
|
|
Object? code = const $CopyWithPlaceholder(),
|
|
Object? currency = const $CopyWithPlaceholder(),
|
|
Object? historyFrom = const $CopyWithPlaceholder(),
|
|
Object? historyTo = const $CopyWithPlaceholder(),
|
|
Object? id = const $CopyWithPlaceholder(),
|
|
Object? instrumentId = const $CopyWithPlaceholder(),
|
|
Object? isActive = const $CopyWithPlaceholder(),
|
|
Object? isDefault = const $CopyWithPlaceholder(),
|
|
Object? kind = const $CopyWithPlaceholder(),
|
|
Object? name = const $CopyWithPlaceholder(),
|
|
Object? source_ = const $CopyWithPlaceholder(),
|
|
}) {
|
|
return BenchmarkOut(
|
|
code: code == const $CopyWithPlaceholder()
|
|
? _value.code
|
|
// ignore: cast_nullable_to_non_nullable
|
|
: code as String,
|
|
currency: currency == const $CopyWithPlaceholder()
|
|
? _value.currency
|
|
// ignore: cast_nullable_to_non_nullable
|
|
: currency as String,
|
|
historyFrom: historyFrom == const $CopyWithPlaceholder()
|
|
? _value.historyFrom
|
|
// ignore: cast_nullable_to_non_nullable
|
|
: historyFrom as DateTime?,
|
|
historyTo: historyTo == const $CopyWithPlaceholder()
|
|
? _value.historyTo
|
|
// ignore: cast_nullable_to_non_nullable
|
|
: historyTo as DateTime?,
|
|
id: id == const $CopyWithPlaceholder()
|
|
? _value.id
|
|
// ignore: cast_nullable_to_non_nullable
|
|
: id as int,
|
|
instrumentId: instrumentId == const $CopyWithPlaceholder()
|
|
? _value.instrumentId
|
|
// ignore: cast_nullable_to_non_nullable
|
|
: instrumentId as int?,
|
|
isActive: isActive == const $CopyWithPlaceholder()
|
|
? _value.isActive
|
|
// ignore: cast_nullable_to_non_nullable
|
|
: isActive as bool,
|
|
isDefault: isDefault == const $CopyWithPlaceholder()
|
|
? _value.isDefault
|
|
// ignore: cast_nullable_to_non_nullable
|
|
: isDefault as bool,
|
|
kind: kind == const $CopyWithPlaceholder()
|
|
? _value.kind
|
|
// ignore: cast_nullable_to_non_nullable
|
|
: kind as String,
|
|
name: name == const $CopyWithPlaceholder()
|
|
? _value.name
|
|
// ignore: cast_nullable_to_non_nullable
|
|
: name as String,
|
|
source_: source_ == const $CopyWithPlaceholder()
|
|
? _value.source_
|
|
// ignore: cast_nullable_to_non_nullable
|
|
: source_ as String,
|
|
);
|
|
}
|
|
}
|
|
|
|
extension $BenchmarkOutCopyWith on BenchmarkOut {
|
|
/// Returns a callable class that can be used as follows: `instanceOfBenchmarkOut.copyWith(...)` or like so:`instanceOfBenchmarkOut.copyWith.fieldName(...)`.
|
|
// ignore: library_private_types_in_public_api
|
|
_$BenchmarkOutCWProxy get copyWith => _$BenchmarkOutCWProxyImpl(this);
|
|
}
|
|
|
|
// **************************************************************************
|
|
// JsonSerializableGenerator
|
|
// **************************************************************************
|
|
|
|
BenchmarkOut _$BenchmarkOutFromJson(Map<String, dynamic> json) =>
|
|
$checkedCreate(
|
|
'BenchmarkOut',
|
|
json,
|
|
($checkedConvert) {
|
|
$checkKeys(
|
|
json,
|
|
requiredKeys: const [
|
|
'code',
|
|
'currency',
|
|
'history_from',
|
|
'history_to',
|
|
'id',
|
|
'instrument_id',
|
|
'is_active',
|
|
'is_default',
|
|
'kind',
|
|
'name',
|
|
'source',
|
|
],
|
|
);
|
|
final val = BenchmarkOut(
|
|
code: $checkedConvert('code', (v) => v as String),
|
|
currency: $checkedConvert('currency', (v) => v as String),
|
|
historyFrom: $checkedConvert(
|
|
'history_from',
|
|
(v) => v == null ? null : DateTime.parse(v as String),
|
|
),
|
|
historyTo: $checkedConvert(
|
|
'history_to',
|
|
(v) => v == null ? null : DateTime.parse(v as String),
|
|
),
|
|
id: $checkedConvert('id', (v) => (v as num).toInt()),
|
|
instrumentId: $checkedConvert(
|
|
'instrument_id',
|
|
(v) => (v as num?)?.toInt(),
|
|
),
|
|
isActive: $checkedConvert('is_active', (v) => v as bool),
|
|
isDefault: $checkedConvert('is_default', (v) => v as bool),
|
|
kind: $checkedConvert('kind', (v) => v as String),
|
|
name: $checkedConvert('name', (v) => v as String),
|
|
source_: $checkedConvert('source', (v) => v as String),
|
|
);
|
|
return val;
|
|
},
|
|
fieldKeyMap: const {
|
|
'historyFrom': 'history_from',
|
|
'historyTo': 'history_to',
|
|
'instrumentId': 'instrument_id',
|
|
'isActive': 'is_active',
|
|
'isDefault': 'is_default',
|
|
'source_': 'source',
|
|
},
|
|
);
|
|
|
|
Map<String, dynamic> _$BenchmarkOutToJson(BenchmarkOut instance) =>
|
|
<String, dynamic>{
|
|
'code': instance.code,
|
|
'currency': instance.currency,
|
|
'history_from': instance.historyFrom?.toIso8601String(),
|
|
'history_to': instance.historyTo?.toIso8601String(),
|
|
'id': instance.id,
|
|
'instrument_id': instance.instrumentId,
|
|
'is_active': instance.isActive,
|
|
'is_default': instance.isDefault,
|
|
'kind': instance.kind,
|
|
'name': instance.name,
|
|
'source': instance.source_,
|
|
};
|