// GENERATED CODE - DO NOT MODIFY BY HAND part of 'lot_out.dart'; // ************************************************************************** // CopyWithGenerator // ************************************************************************** abstract class _$LotOutCWProxy { LotOut accountId(int accountId); LotOut closedAt(DateTime? closedAt); LotOut costCurrency(String costCurrency); LotOut costPerUnit(String costPerUnit); LotOut costTotalRub(String? costTotalRub); LotOut id(int id); LotOut openDate(DateTime openDate); LotOut qtyOpen(String qtyOpen); LotOut qtyRemaining(String qtyRemaining); /// This function **does support** nullification of nullable fields. All `null` values passed to `non-nullable` fields will be ignored. You can also use `LotOut(...).copyWith.fieldName(...)` to override fields one at a time with nullification support. /// /// Usage /// ```dart /// LotOut(...).copyWith(id: 12, name: "My name") /// ```` LotOut call({ int accountId, DateTime? closedAt, String costCurrency, String costPerUnit, String? costTotalRub, int id, DateTime openDate, String qtyOpen, String qtyRemaining, }); } /// Proxy class for `copyWith` functionality. This is a callable class and can be used as follows: `instanceOfLotOut.copyWith(...)`. Additionally contains functions for specific fields e.g. `instanceOfLotOut.copyWith.fieldName(...)` class _$LotOutCWProxyImpl implements _$LotOutCWProxy { const _$LotOutCWProxyImpl(this._value); final LotOut _value; @override LotOut accountId(int accountId) => this(accountId: accountId); @override LotOut closedAt(DateTime? closedAt) => this(closedAt: closedAt); @override LotOut costCurrency(String costCurrency) => this(costCurrency: costCurrency); @override LotOut costPerUnit(String costPerUnit) => this(costPerUnit: costPerUnit); @override LotOut costTotalRub(String? costTotalRub) => this(costTotalRub: costTotalRub); @override LotOut id(int id) => this(id: id); @override LotOut openDate(DateTime openDate) => this(openDate: openDate); @override LotOut qtyOpen(String qtyOpen) => this(qtyOpen: qtyOpen); @override LotOut qtyRemaining(String qtyRemaining) => this(qtyRemaining: qtyRemaining); @override /// This function **does support** nullification of nullable fields. All `null` values passed to `non-nullable` fields will be ignored. You can also use `LotOut(...).copyWith.fieldName(...)` to override fields one at a time with nullification support. /// /// Usage /// ```dart /// LotOut(...).copyWith(id: 12, name: "My name") /// ```` LotOut call({ Object? accountId = const $CopyWithPlaceholder(), Object? closedAt = const $CopyWithPlaceholder(), Object? costCurrency = const $CopyWithPlaceholder(), Object? costPerUnit = const $CopyWithPlaceholder(), Object? costTotalRub = const $CopyWithPlaceholder(), Object? id = const $CopyWithPlaceholder(), Object? openDate = const $CopyWithPlaceholder(), Object? qtyOpen = const $CopyWithPlaceholder(), Object? qtyRemaining = const $CopyWithPlaceholder(), }) { return LotOut( accountId: accountId == const $CopyWithPlaceholder() ? _value.accountId // ignore: cast_nullable_to_non_nullable : accountId as int, closedAt: closedAt == const $CopyWithPlaceholder() ? _value.closedAt // ignore: cast_nullable_to_non_nullable : closedAt as DateTime?, costCurrency: costCurrency == const $CopyWithPlaceholder() ? _value.costCurrency // ignore: cast_nullable_to_non_nullable : costCurrency as String, costPerUnit: costPerUnit == const $CopyWithPlaceholder() ? _value.costPerUnit // ignore: cast_nullable_to_non_nullable : costPerUnit as String, costTotalRub: costTotalRub == const $CopyWithPlaceholder() ? _value.costTotalRub // ignore: cast_nullable_to_non_nullable : costTotalRub as String?, id: id == const $CopyWithPlaceholder() ? _value.id // ignore: cast_nullable_to_non_nullable : id as int, openDate: openDate == const $CopyWithPlaceholder() ? _value.openDate // ignore: cast_nullable_to_non_nullable : openDate as DateTime, qtyOpen: qtyOpen == const $CopyWithPlaceholder() ? _value.qtyOpen // ignore: cast_nullable_to_non_nullable : qtyOpen as String, qtyRemaining: qtyRemaining == const $CopyWithPlaceholder() ? _value.qtyRemaining // ignore: cast_nullable_to_non_nullable : qtyRemaining as String, ); } } extension $LotOutCopyWith on LotOut { /// Returns a callable class that can be used as follows: `instanceOfLotOut.copyWith(...)` or like so:`instanceOfLotOut.copyWith.fieldName(...)`. // ignore: library_private_types_in_public_api _$LotOutCWProxy get copyWith => _$LotOutCWProxyImpl(this); } // ************************************************************************** // JsonSerializableGenerator // ************************************************************************** LotOut _$LotOutFromJson(Map json) => $checkedCreate( 'LotOut', json, ($checkedConvert) { $checkKeys( json, requiredKeys: const [ 'account_id', 'closed_at', 'cost_currency', 'cost_per_unit', 'cost_total_rub', 'id', 'open_date', 'qty_open', 'qty_remaining', ], ); final val = LotOut( accountId: $checkedConvert('account_id', (v) => (v as num).toInt()), closedAt: $checkedConvert( 'closed_at', (v) => v == null ? null : DateTime.parse(v as String), ), costCurrency: $checkedConvert('cost_currency', (v) => v as String), costPerUnit: $checkedConvert('cost_per_unit', (v) => v as String), costTotalRub: $checkedConvert('cost_total_rub', (v) => v as String?), id: $checkedConvert('id', (v) => (v as num).toInt()), openDate: $checkedConvert( 'open_date', (v) => DateTime.parse(v as String), ), qtyOpen: $checkedConvert('qty_open', (v) => v as String), qtyRemaining: $checkedConvert('qty_remaining', (v) => v as String), ); return val; }, fieldKeyMap: const { 'accountId': 'account_id', 'closedAt': 'closed_at', 'costCurrency': 'cost_currency', 'costPerUnit': 'cost_per_unit', 'costTotalRub': 'cost_total_rub', 'openDate': 'open_date', 'qtyOpen': 'qty_open', 'qtyRemaining': 'qty_remaining', }, ); Map _$LotOutToJson(LotOut instance) => { 'account_id': instance.accountId, 'closed_at': instance.closedAt?.toIso8601String(), 'cost_currency': instance.costCurrency, 'cost_per_unit': instance.costPerUnit, 'cost_total_rub': instance.costTotalRub, 'id': instance.id, 'open_date': instance.openDate.toIso8601String(), 'qty_open': instance.qtyOpen, 'qty_remaining': instance.qtyRemaining, };