// GENERATED CODE - DO NOT MODIFY BY HAND part of 'transaction_out.dart'; // ************************************************************************** // CopyWithGenerator // ************************************************************************** abstract class _$TransactionOutCWProxy { TransactionOut categoryId(int? categoryId); TransactionOut comment(String? comment); TransactionOut date(DateTime date); TransactionOut deleted(bool deleted); TransactionOut flowType(FlowType flowType); TransactionOut hold(bool hold); TransactionOut id(int id); TransactionOut income(String income); TransactionOut incomeAccountId(int? incomeAccountId); TransactionOut incomeCurrency(String? incomeCurrency); TransactionOut incomeRub(String? incomeRub); TransactionOut isOneOff(bool isOneOff); TransactionOut mcc(int? mcc); TransactionOut outcome(String outcome); TransactionOut outcomeAccountId(int? outcomeAccountId); TransactionOut outcomeCurrency(String? outcomeCurrency); TransactionOut outcomeRub(String? outcomeRub); TransactionOut payee(String? payee); TransactionOut payeeCanonical(String? payeeCanonical); TransactionOut sourceId(String sourceId); TransactionOut tags(List tags); TransactionOut tripId(int? tripId); TransactionOut ts(DateTime ts); /// This function **does support** nullification of nullable fields. All `null` values passed to `non-nullable` fields will be ignored. You can also use `TransactionOut(...).copyWith.fieldName(...)` to override fields one at a time with nullification support. /// /// Usage /// ```dart /// TransactionOut(...).copyWith(id: 12, name: "My name") /// ```` TransactionOut call({ int? categoryId, String? comment, DateTime date, bool deleted, FlowType flowType, bool hold, int id, String income, int? incomeAccountId, String? incomeCurrency, String? incomeRub, bool isOneOff, int? mcc, String outcome, int? outcomeAccountId, String? outcomeCurrency, String? outcomeRub, String? payee, String? payeeCanonical, String sourceId, List tags, int? tripId, DateTime ts, }); } /// Proxy class for `copyWith` functionality. This is a callable class and can be used as follows: `instanceOfTransactionOut.copyWith(...)`. Additionally contains functions for specific fields e.g. `instanceOfTransactionOut.copyWith.fieldName(...)` class _$TransactionOutCWProxyImpl implements _$TransactionOutCWProxy { const _$TransactionOutCWProxyImpl(this._value); final TransactionOut _value; @override TransactionOut categoryId(int? categoryId) => this(categoryId: categoryId); @override TransactionOut comment(String? comment) => this(comment: comment); @override TransactionOut date(DateTime date) => this(date: date); @override TransactionOut deleted(bool deleted) => this(deleted: deleted); @override TransactionOut flowType(FlowType flowType) => this(flowType: flowType); @override TransactionOut hold(bool hold) => this(hold: hold); @override TransactionOut id(int id) => this(id: id); @override TransactionOut income(String income) => this(income: income); @override TransactionOut incomeAccountId(int? incomeAccountId) => this(incomeAccountId: incomeAccountId); @override TransactionOut incomeCurrency(String? incomeCurrency) => this(incomeCurrency: incomeCurrency); @override TransactionOut incomeRub(String? incomeRub) => this(incomeRub: incomeRub); @override TransactionOut isOneOff(bool isOneOff) => this(isOneOff: isOneOff); @override TransactionOut mcc(int? mcc) => this(mcc: mcc); @override TransactionOut outcome(String outcome) => this(outcome: outcome); @override TransactionOut outcomeAccountId(int? outcomeAccountId) => this(outcomeAccountId: outcomeAccountId); @override TransactionOut outcomeCurrency(String? outcomeCurrency) => this(outcomeCurrency: outcomeCurrency); @override TransactionOut outcomeRub(String? outcomeRub) => this(outcomeRub: outcomeRub); @override TransactionOut payee(String? payee) => this(payee: payee); @override TransactionOut payeeCanonical(String? payeeCanonical) => this(payeeCanonical: payeeCanonical); @override TransactionOut sourceId(String sourceId) => this(sourceId: sourceId); @override TransactionOut tags(List tags) => this(tags: tags); @override TransactionOut tripId(int? tripId) => this(tripId: tripId); @override TransactionOut ts(DateTime ts) => this(ts: ts); @override /// This function **does support** nullification of nullable fields. All `null` values passed to `non-nullable` fields will be ignored. You can also use `TransactionOut(...).copyWith.fieldName(...)` to override fields one at a time with nullification support. /// /// Usage /// ```dart /// TransactionOut(...).copyWith(id: 12, name: "My name") /// ```` TransactionOut call({ Object? categoryId = const $CopyWithPlaceholder(), Object? comment = const $CopyWithPlaceholder(), Object? date = const $CopyWithPlaceholder(), Object? deleted = const $CopyWithPlaceholder(), Object? flowType = const $CopyWithPlaceholder(), Object? hold = const $CopyWithPlaceholder(), Object? id = const $CopyWithPlaceholder(), Object? income = const $CopyWithPlaceholder(), Object? incomeAccountId = const $CopyWithPlaceholder(), Object? incomeCurrency = const $CopyWithPlaceholder(), Object? incomeRub = const $CopyWithPlaceholder(), Object? isOneOff = const $CopyWithPlaceholder(), Object? mcc = const $CopyWithPlaceholder(), Object? outcome = const $CopyWithPlaceholder(), Object? outcomeAccountId = const $CopyWithPlaceholder(), Object? outcomeCurrency = const $CopyWithPlaceholder(), Object? outcomeRub = const $CopyWithPlaceholder(), Object? payee = const $CopyWithPlaceholder(), Object? payeeCanonical = const $CopyWithPlaceholder(), Object? sourceId = const $CopyWithPlaceholder(), Object? tags = const $CopyWithPlaceholder(), Object? tripId = const $CopyWithPlaceholder(), Object? ts = const $CopyWithPlaceholder(), }) { return TransactionOut( categoryId: categoryId == const $CopyWithPlaceholder() ? _value.categoryId // ignore: cast_nullable_to_non_nullable : categoryId as int?, comment: comment == const $CopyWithPlaceholder() ? _value.comment // ignore: cast_nullable_to_non_nullable : comment as String?, date: date == const $CopyWithPlaceholder() ? _value.date // ignore: cast_nullable_to_non_nullable : date as DateTime, deleted: deleted == const $CopyWithPlaceholder() ? _value.deleted // ignore: cast_nullable_to_non_nullable : deleted as bool, flowType: flowType == const $CopyWithPlaceholder() ? _value.flowType // ignore: cast_nullable_to_non_nullable : flowType as FlowType, hold: hold == const $CopyWithPlaceholder() ? _value.hold // ignore: cast_nullable_to_non_nullable : hold as bool, id: id == const $CopyWithPlaceholder() ? _value.id // ignore: cast_nullable_to_non_nullable : id as int, income: income == const $CopyWithPlaceholder() ? _value.income // ignore: cast_nullable_to_non_nullable : income as String, incomeAccountId: incomeAccountId == const $CopyWithPlaceholder() ? _value.incomeAccountId // ignore: cast_nullable_to_non_nullable : incomeAccountId as int?, incomeCurrency: incomeCurrency == const $CopyWithPlaceholder() ? _value.incomeCurrency // ignore: cast_nullable_to_non_nullable : incomeCurrency as String?, incomeRub: incomeRub == const $CopyWithPlaceholder() ? _value.incomeRub // ignore: cast_nullable_to_non_nullable : incomeRub as String?, isOneOff: isOneOff == const $CopyWithPlaceholder() ? _value.isOneOff // ignore: cast_nullable_to_non_nullable : isOneOff as bool, mcc: mcc == const $CopyWithPlaceholder() ? _value.mcc // ignore: cast_nullable_to_non_nullable : mcc as int?, outcome: outcome == const $CopyWithPlaceholder() ? _value.outcome // ignore: cast_nullable_to_non_nullable : outcome as String, outcomeAccountId: outcomeAccountId == const $CopyWithPlaceholder() ? _value.outcomeAccountId // ignore: cast_nullable_to_non_nullable : outcomeAccountId as int?, outcomeCurrency: outcomeCurrency == const $CopyWithPlaceholder() ? _value.outcomeCurrency // ignore: cast_nullable_to_non_nullable : outcomeCurrency as String?, outcomeRub: outcomeRub == const $CopyWithPlaceholder() ? _value.outcomeRub // ignore: cast_nullable_to_non_nullable : outcomeRub as String?, payee: payee == const $CopyWithPlaceholder() ? _value.payee // ignore: cast_nullable_to_non_nullable : payee as String?, payeeCanonical: payeeCanonical == const $CopyWithPlaceholder() ? _value.payeeCanonical // ignore: cast_nullable_to_non_nullable : payeeCanonical as String?, sourceId: sourceId == const $CopyWithPlaceholder() ? _value.sourceId // ignore: cast_nullable_to_non_nullable : sourceId as String, tags: tags == const $CopyWithPlaceholder() ? _value.tags // ignore: cast_nullable_to_non_nullable : tags as List, tripId: tripId == const $CopyWithPlaceholder() ? _value.tripId // ignore: cast_nullable_to_non_nullable : tripId as int?, ts: ts == const $CopyWithPlaceholder() ? _value.ts // ignore: cast_nullable_to_non_nullable : ts as DateTime, ); } } extension $TransactionOutCopyWith on TransactionOut { /// Returns a callable class that can be used as follows: `instanceOfTransactionOut.copyWith(...)` or like so:`instanceOfTransactionOut.copyWith.fieldName(...)`. // ignore: library_private_types_in_public_api _$TransactionOutCWProxy get copyWith => _$TransactionOutCWProxyImpl(this); } // ************************************************************************** // JsonSerializableGenerator // ************************************************************************** TransactionOut _$TransactionOutFromJson( Map json, ) => $checkedCreate( 'TransactionOut', json, ($checkedConvert) { $checkKeys( json, requiredKeys: const [ 'category_id', 'comment', 'date', 'deleted', 'flow_type', 'hold', 'id', 'income', 'income_account_id', 'income_currency', 'income_rub', 'is_one_off', 'mcc', 'outcome', 'outcome_account_id', 'outcome_currency', 'outcome_rub', 'payee', 'payee_canonical', 'source_id', 'tags', 'trip_id', 'ts', ], ); final val = TransactionOut( categoryId: $checkedConvert('category_id', (v) => (v as num?)?.toInt()), comment: $checkedConvert('comment', (v) => v as String?), date: $checkedConvert('date', (v) => DateTime.parse(v as String)), deleted: $checkedConvert('deleted', (v) => v as bool), flowType: $checkedConvert( 'flow_type', (v) => $enumDecode( _$FlowTypeEnumMap, v, unknownValue: FlowType.unknownDefaultOpenApi, ), ), hold: $checkedConvert('hold', (v) => v as bool), id: $checkedConvert('id', (v) => (v as num).toInt()), income: $checkedConvert('income', (v) => v as String), incomeAccountId: $checkedConvert( 'income_account_id', (v) => (v as num?)?.toInt(), ), incomeCurrency: $checkedConvert('income_currency', (v) => v as String?), incomeRub: $checkedConvert('income_rub', (v) => v as String?), isOneOff: $checkedConvert('is_one_off', (v) => v as bool), mcc: $checkedConvert('mcc', (v) => (v as num?)?.toInt()), outcome: $checkedConvert('outcome', (v) => v as String), outcomeAccountId: $checkedConvert( 'outcome_account_id', (v) => (v as num?)?.toInt(), ), outcomeCurrency: $checkedConvert('outcome_currency', (v) => v as String?), outcomeRub: $checkedConvert('outcome_rub', (v) => v as String?), payee: $checkedConvert('payee', (v) => v as String?), payeeCanonical: $checkedConvert('payee_canonical', (v) => v as String?), sourceId: $checkedConvert('source_id', (v) => v as String), tags: $checkedConvert( 'tags', (v) => (v as List).map((e) => (e as num).toInt()).toList(), ), tripId: $checkedConvert('trip_id', (v) => (v as num?)?.toInt()), ts: $checkedConvert('ts', (v) => DateTime.parse(v as String)), ); return val; }, fieldKeyMap: const { 'categoryId': 'category_id', 'flowType': 'flow_type', 'incomeAccountId': 'income_account_id', 'incomeCurrency': 'income_currency', 'incomeRub': 'income_rub', 'isOneOff': 'is_one_off', 'outcomeAccountId': 'outcome_account_id', 'outcomeCurrency': 'outcome_currency', 'outcomeRub': 'outcome_rub', 'payeeCanonical': 'payee_canonical', 'sourceId': 'source_id', 'tripId': 'trip_id', }, ); Map _$TransactionOutToJson(TransactionOut instance) => { 'category_id': instance.categoryId, 'comment': instance.comment, 'date': instance.date.toIso8601String(), 'deleted': instance.deleted, 'flow_type': _$FlowTypeEnumMap[instance.flowType]!, 'hold': instance.hold, 'id': instance.id, 'income': instance.income, 'income_account_id': instance.incomeAccountId, 'income_currency': instance.incomeCurrency, 'income_rub': instance.incomeRub, 'is_one_off': instance.isOneOff, 'mcc': instance.mcc, 'outcome': instance.outcome, 'outcome_account_id': instance.outcomeAccountId, 'outcome_currency': instance.outcomeCurrency, 'outcome_rub': instance.outcomeRub, 'payee': instance.payee, 'payee_canonical': instance.payeeCanonical, 'source_id': instance.sourceId, 'tags': instance.tags, 'trip_id': instance.tripId, 'ts': instance.ts.toIso8601String(), }; const _$FlowTypeEnumMap = { FlowType.income: 'income', FlowType.expense: 'expense', FlowType.internalTransfer: 'internal_transfer', FlowType.savingsTransfer: 'savings_transfer', FlowType.brokerExternalFlow: 'broker_external_flow', FlowType.deleted: 'deleted', FlowType.other: 'other', FlowType.unknownDefaultOpenApi: 'unknown_default_open_api', };