just gen-client — покрывает links, cashflow-broker, ручные цены, imports/pending, goals/income/rebalance/tax/benchmarks.
155 lines
5.2 KiB
Dart
155 lines
5.2 KiB
Dart
// GENERATED CODE - DO NOT MODIFY BY HAND
|
|
|
|
part of 'calendar_out.dart';
|
|
|
|
// **************************************************************************
|
|
// CopyWithGenerator
|
|
// **************************************************************************
|
|
|
|
abstract class _$CalendarOutCWProxy {
|
|
CalendarOut asOf(DateTime asOf);
|
|
|
|
CalendarOut byBasis(Map<String, String> byBasis);
|
|
|
|
CalendarOut currency(String currency);
|
|
|
|
CalendarOut entries(List<CalendarEntry> entries);
|
|
|
|
CalendarOut totalExpectedRub(String totalExpectedRub);
|
|
|
|
/// This function **does support** nullification of nullable fields. All `null` values passed to `non-nullable` fields will be ignored. You can also use `CalendarOut(...).copyWith.fieldName(...)` to override fields one at a time with nullification support.
|
|
///
|
|
/// Usage
|
|
/// ```dart
|
|
/// CalendarOut(...).copyWith(id: 12, name: "My name")
|
|
/// ````
|
|
CalendarOut call({
|
|
DateTime asOf,
|
|
Map<String, String> byBasis,
|
|
String currency,
|
|
List<CalendarEntry> entries,
|
|
String totalExpectedRub,
|
|
});
|
|
}
|
|
|
|
/// Proxy class for `copyWith` functionality. This is a callable class and can be used as follows: `instanceOfCalendarOut.copyWith(...)`. Additionally contains functions for specific fields e.g. `instanceOfCalendarOut.copyWith.fieldName(...)`
|
|
class _$CalendarOutCWProxyImpl implements _$CalendarOutCWProxy {
|
|
const _$CalendarOutCWProxyImpl(this._value);
|
|
|
|
final CalendarOut _value;
|
|
|
|
@override
|
|
CalendarOut asOf(DateTime asOf) => this(asOf: asOf);
|
|
|
|
@override
|
|
CalendarOut byBasis(Map<String, String> byBasis) => this(byBasis: byBasis);
|
|
|
|
@override
|
|
CalendarOut currency(String currency) => this(currency: currency);
|
|
|
|
@override
|
|
CalendarOut entries(List<CalendarEntry> entries) => this(entries: entries);
|
|
|
|
@override
|
|
CalendarOut totalExpectedRub(String totalExpectedRub) =>
|
|
this(totalExpectedRub: totalExpectedRub);
|
|
|
|
@override
|
|
/// This function **does support** nullification of nullable fields. All `null` values passed to `non-nullable` fields will be ignored. You can also use `CalendarOut(...).copyWith.fieldName(...)` to override fields one at a time with nullification support.
|
|
///
|
|
/// Usage
|
|
/// ```dart
|
|
/// CalendarOut(...).copyWith(id: 12, name: "My name")
|
|
/// ````
|
|
CalendarOut call({
|
|
Object? asOf = const $CopyWithPlaceholder(),
|
|
Object? byBasis = const $CopyWithPlaceholder(),
|
|
Object? currency = const $CopyWithPlaceholder(),
|
|
Object? entries = const $CopyWithPlaceholder(),
|
|
Object? totalExpectedRub = const $CopyWithPlaceholder(),
|
|
}) {
|
|
return CalendarOut(
|
|
asOf: asOf == const $CopyWithPlaceholder()
|
|
? _value.asOf
|
|
// ignore: cast_nullable_to_non_nullable
|
|
: asOf as DateTime,
|
|
byBasis: byBasis == const $CopyWithPlaceholder()
|
|
? _value.byBasis
|
|
// ignore: cast_nullable_to_non_nullable
|
|
: byBasis as Map<String, String>,
|
|
currency: currency == const $CopyWithPlaceholder()
|
|
? _value.currency
|
|
// ignore: cast_nullable_to_non_nullable
|
|
: currency as String,
|
|
entries: entries == const $CopyWithPlaceholder()
|
|
? _value.entries
|
|
// ignore: cast_nullable_to_non_nullable
|
|
: entries as List<CalendarEntry>,
|
|
totalExpectedRub: totalExpectedRub == const $CopyWithPlaceholder()
|
|
? _value.totalExpectedRub
|
|
// ignore: cast_nullable_to_non_nullable
|
|
: totalExpectedRub as String,
|
|
);
|
|
}
|
|
}
|
|
|
|
extension $CalendarOutCopyWith on CalendarOut {
|
|
/// Returns a callable class that can be used as follows: `instanceOfCalendarOut.copyWith(...)` or like so:`instanceOfCalendarOut.copyWith.fieldName(...)`.
|
|
// ignore: library_private_types_in_public_api
|
|
_$CalendarOutCWProxy get copyWith => _$CalendarOutCWProxyImpl(this);
|
|
}
|
|
|
|
// **************************************************************************
|
|
// JsonSerializableGenerator
|
|
// **************************************************************************
|
|
|
|
CalendarOut _$CalendarOutFromJson(Map<String, dynamic> json) => $checkedCreate(
|
|
'CalendarOut',
|
|
json,
|
|
($checkedConvert) {
|
|
$checkKeys(
|
|
json,
|
|
requiredKeys: const [
|
|
'as_of',
|
|
'by_basis',
|
|
'currency',
|
|
'entries',
|
|
'total_expected_rub',
|
|
],
|
|
);
|
|
final val = CalendarOut(
|
|
asOf: $checkedConvert('as_of', (v) => DateTime.parse(v as String)),
|
|
byBasis: $checkedConvert(
|
|
'by_basis',
|
|
(v) => Map<String, String>.from(v as Map),
|
|
),
|
|
currency: $checkedConvert('currency', (v) => v as String),
|
|
entries: $checkedConvert(
|
|
'entries',
|
|
(v) => (v as List<dynamic>)
|
|
.map((e) => CalendarEntry.fromJson(e as Map<String, dynamic>))
|
|
.toList(),
|
|
),
|
|
totalExpectedRub: $checkedConvert(
|
|
'total_expected_rub',
|
|
(v) => v as String,
|
|
),
|
|
);
|
|
return val;
|
|
},
|
|
fieldKeyMap: const {
|
|
'asOf': 'as_of',
|
|
'byBasis': 'by_basis',
|
|
'totalExpectedRub': 'total_expected_rub',
|
|
},
|
|
);
|
|
|
|
Map<String, dynamic> _$CalendarOutToJson(CalendarOut instance) =>
|
|
<String, dynamic>{
|
|
'as_of': instance.asOf.toIso8601String(),
|
|
'by_basis': instance.byBasis,
|
|
'currency': instance.currency,
|
|
'entries': instance.entries.map((e) => e.toJson()).toList(),
|
|
'total_expected_rub': instance.totalExpectedRub,
|
|
};
|