just gen-client — покрывает links, cashflow-broker, ручные цены, imports/pending, goals/income/rebalance/tax/benchmarks.
179 lines
6.3 KiB
Dart
179 lines
6.3 KiB
Dart
// GENERATED CODE - DO NOT MODIFY BY HAND
|
|
|
|
part of 'benchmark_create.dart';
|
|
|
|
// **************************************************************************
|
|
// CopyWithGenerator
|
|
// **************************************************************************
|
|
|
|
abstract class _$BenchmarkCreateCWProxy {
|
|
BenchmarkCreate code(String code);
|
|
|
|
BenchmarkCreate currency(String? currency);
|
|
|
|
BenchmarkCreate instrumentId(int? instrumentId);
|
|
|
|
BenchmarkCreate isActive(bool? isActive);
|
|
|
|
BenchmarkCreate isDefault(bool? isDefault);
|
|
|
|
BenchmarkCreate kind(String kind);
|
|
|
|
BenchmarkCreate name(String name);
|
|
|
|
BenchmarkCreate 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 `BenchmarkCreate(...).copyWith.fieldName(...)` to override fields one at a time with nullification support.
|
|
///
|
|
/// Usage
|
|
/// ```dart
|
|
/// BenchmarkCreate(...).copyWith(id: 12, name: "My name")
|
|
/// ````
|
|
BenchmarkCreate call({
|
|
String code,
|
|
String? currency,
|
|
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: `instanceOfBenchmarkCreate.copyWith(...)`. Additionally contains functions for specific fields e.g. `instanceOfBenchmarkCreate.copyWith.fieldName(...)`
|
|
class _$BenchmarkCreateCWProxyImpl implements _$BenchmarkCreateCWProxy {
|
|
const _$BenchmarkCreateCWProxyImpl(this._value);
|
|
|
|
final BenchmarkCreate _value;
|
|
|
|
@override
|
|
BenchmarkCreate code(String code) => this(code: code);
|
|
|
|
@override
|
|
BenchmarkCreate currency(String? currency) => this(currency: currency);
|
|
|
|
@override
|
|
BenchmarkCreate instrumentId(int? instrumentId) =>
|
|
this(instrumentId: instrumentId);
|
|
|
|
@override
|
|
BenchmarkCreate isActive(bool? isActive) => this(isActive: isActive);
|
|
|
|
@override
|
|
BenchmarkCreate isDefault(bool? isDefault) => this(isDefault: isDefault);
|
|
|
|
@override
|
|
BenchmarkCreate kind(String kind) => this(kind: kind);
|
|
|
|
@override
|
|
BenchmarkCreate name(String name) => this(name: name);
|
|
|
|
@override
|
|
BenchmarkCreate 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 `BenchmarkCreate(...).copyWith.fieldName(...)` to override fields one at a time with nullification support.
|
|
///
|
|
/// Usage
|
|
/// ```dart
|
|
/// BenchmarkCreate(...).copyWith(id: 12, name: "My name")
|
|
/// ````
|
|
BenchmarkCreate call({
|
|
Object? code = const $CopyWithPlaceholder(),
|
|
Object? currency = 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 BenchmarkCreate(
|
|
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?,
|
|
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 $BenchmarkCreateCopyWith on BenchmarkCreate {
|
|
/// Returns a callable class that can be used as follows: `instanceOfBenchmarkCreate.copyWith(...)` or like so:`instanceOfBenchmarkCreate.copyWith.fieldName(...)`.
|
|
// ignore: library_private_types_in_public_api
|
|
_$BenchmarkCreateCWProxy get copyWith => _$BenchmarkCreateCWProxyImpl(this);
|
|
}
|
|
|
|
// **************************************************************************
|
|
// JsonSerializableGenerator
|
|
// **************************************************************************
|
|
|
|
BenchmarkCreate _$BenchmarkCreateFromJson(Map<String, dynamic> json) =>
|
|
$checkedCreate(
|
|
'BenchmarkCreate',
|
|
json,
|
|
($checkedConvert) {
|
|
$checkKeys(json, requiredKeys: const ['code', 'kind', 'name']);
|
|
final val = BenchmarkCreate(
|
|
code: $checkedConvert('code', (v) => v as String),
|
|
currency: $checkedConvert('currency', (v) => v as String? ?? 'RUB'),
|
|
instrumentId: $checkedConvert(
|
|
'instrument_id',
|
|
(v) => (v as num?)?.toInt(),
|
|
),
|
|
isActive: $checkedConvert('is_active', (v) => v as bool? ?? true),
|
|
isDefault: $checkedConvert('is_default', (v) => v as bool? ?? false),
|
|
kind: $checkedConvert('kind', (v) => v as String),
|
|
name: $checkedConvert('name', (v) => v as String),
|
|
source_: $checkedConvert('source', (v) => v as String? ?? 'moex'),
|
|
);
|
|
return val;
|
|
},
|
|
fieldKeyMap: const {
|
|
'instrumentId': 'instrument_id',
|
|
'isActive': 'is_active',
|
|
'isDefault': 'is_default',
|
|
'source_': 'source',
|
|
},
|
|
);
|
|
|
|
Map<String, dynamic> _$BenchmarkCreateToJson(BenchmarkCreate instance) =>
|
|
<String, dynamic>{
|
|
'code': instance.code,
|
|
'currency': ?instance.currency,
|
|
'instrument_id': ?instance.instrumentId,
|
|
'is_active': ?instance.isActive,
|
|
'is_default': ?instance.isDefault,
|
|
'kind': instance.kind,
|
|
'name': instance.name,
|
|
'source': ?instance.source_,
|
|
};
|