// GENERATED CODE - DO NOT MODIFY BY HAND part of 'payment_model.dart'; // ************************************************************************** // BuiltValueGenerator // ************************************************************************** Serializer _$paymentListResponseSerializer = new _$PaymentListResponseSerializer(); Serializer _$paymentItemResponseSerializer = new _$PaymentItemResponseSerializer(); Serializer _$paymentEntitySerializer = new _$PaymentEntitySerializer(); class _$PaymentListResponseSerializer implements StructuredSerializer { @override final Iterable types = const [ PaymentListResponse, _$PaymentListResponse ]; @override final String wireName = 'PaymentListResponse'; @override Iterable serialize( Serializers serializers, PaymentListResponse object, {FullType specifiedType = FullType.unspecified}) { final result = [ 'data', serializers.serialize(object.data, specifiedType: const FullType(BuiltList, const [const FullType(PaymentEntity)])), ]; return result; } @override PaymentListResponse deserialize( Serializers serializers, Iterable serialized, {FullType specifiedType = FullType.unspecified}) { final result = new PaymentListResponseBuilder(); final iterator = serialized.iterator; while (iterator.moveNext()) { final key = iterator.current as String; iterator.moveNext(); final dynamic value = iterator.current; switch (key) { case 'data': result.data.replace(serializers.deserialize(value, specifiedType: const FullType( BuiltList, const [const FullType(PaymentEntity)])) as BuiltList); break; } } return result.build(); } } class _$PaymentItemResponseSerializer implements StructuredSerializer { @override final Iterable types = const [ PaymentItemResponse, _$PaymentItemResponse ]; @override final String wireName = 'PaymentItemResponse'; @override Iterable serialize( Serializers serializers, PaymentItemResponse object, {FullType specifiedType = FullType.unspecified}) { final result = [ 'data', serializers.serialize(object.data, specifiedType: const FullType(PaymentEntity)), ]; return result; } @override PaymentItemResponse deserialize( Serializers serializers, Iterable serialized, {FullType specifiedType = FullType.unspecified}) { final result = new PaymentItemResponseBuilder(); final iterator = serialized.iterator; while (iterator.moveNext()) { final key = iterator.current as String; iterator.moveNext(); final dynamic value = iterator.current; switch (key) { case 'data': result.data.replace(serializers.deserialize(value, specifiedType: const FullType(PaymentEntity)) as PaymentEntity); break; } } return result.build(); } } class _$PaymentEntitySerializer implements StructuredSerializer { @override final Iterable types = const [PaymentEntity, _$PaymentEntity]; @override final String wireName = 'PaymentEntity'; @override Iterable serialize(Serializers serializers, PaymentEntity object, {FullType specifiedType = FullType.unspecified}) { final result = [ 'amount', serializers.serialize(object.amount, specifiedType: const FullType(double)), 'refunded', serializers.serialize(object.refunded, specifiedType: const FullType(double)), 'transaction_reference', serializers.serialize(object.transactionReference, specifiedType: const FullType(String)), 'date', serializers.serialize(object.date, specifiedType: const FullType(String)), 'type_id', serializers.serialize(object.typeId, specifiedType: const FullType(String)), 'is_manual', serializers.serialize(object.isManual, specifiedType: const FullType(bool)), ]; if (object.number != null) { result ..add('number') ..add(serializers.serialize(object.number, specifiedType: const FullType(String))); } if (object.clientId != null) { result ..add('client_id') ..add(serializers.serialize(object.clientId, specifiedType: const FullType(String))); } if (object.statusId != null) { result ..add('status_id') ..add(serializers.serialize(object.statusId, specifiedType: const FullType(String))); } if (object.invoiceId != null) { result ..add('invoice_id') ..add(serializers.serialize(object.invoiceId, specifiedType: const FullType(String))); } if (object.privateNotes != null) { result ..add('private_notes') ..add(serializers.serialize(object.privateNotes, specifiedType: const FullType(String))); } if (object.customValue1 != null) { result ..add('custom_value1') ..add(serializers.serialize(object.customValue1, specifiedType: const FullType(String))); } if (object.customValue2 != null) { result ..add('custom_value2') ..add(serializers.serialize(object.customValue2, specifiedType: const FullType(String))); } if (object.customValue3 != null) { result ..add('custom_value3') ..add(serializers.serialize(object.customValue3, specifiedType: const FullType(String))); } if (object.customValue4 != null) { result ..add('custom_value4') ..add(serializers.serialize(object.customValue4, specifiedType: const FullType(String))); } if (object.exchangeRate != null) { result ..add('exchange_rate') ..add(serializers.serialize(object.exchangeRate, specifiedType: const FullType(double))); } if (object.exchangeCurrencyId != null) { result ..add('exchange_currency_id') ..add(serializers.serialize(object.exchangeCurrencyId, specifiedType: const FullType(String))); } if (object.isChanged != null) { result ..add('isChanged') ..add(serializers.serialize(object.isChanged, specifiedType: const FullType(bool))); } if (object.createdAt != null) { result ..add('created_at') ..add(serializers.serialize(object.createdAt, specifiedType: const FullType(int))); } if (object.updatedAt != null) { result ..add('updated_at') ..add(serializers.serialize(object.updatedAt, specifiedType: const FullType(int))); } if (object.archivedAt != null) { result ..add('archived_at') ..add(serializers.serialize(object.archivedAt, specifiedType: const FullType(int))); } if (object.isDeleted != null) { result ..add('is_deleted') ..add(serializers.serialize(object.isDeleted, specifiedType: const FullType(bool))); } if (object.createdUserId != null) { result ..add('user_id') ..add(serializers.serialize(object.createdUserId, specifiedType: const FullType(String))); } if (object.assignedUserId != null) { result ..add('assigned_user_id') ..add(serializers.serialize(object.assignedUserId, specifiedType: const FullType(String))); } if (object.id != null) { result ..add('id') ..add(serializers.serialize(object.id, specifiedType: const FullType(String))); } return result; } @override PaymentEntity deserialize( Serializers serializers, Iterable serialized, {FullType specifiedType = FullType.unspecified}) { final result = new PaymentEntityBuilder(); final iterator = serialized.iterator; while (iterator.moveNext()) { final key = iterator.current as String; iterator.moveNext(); final dynamic value = iterator.current; switch (key) { case 'amount': result.amount = serializers.deserialize(value, specifiedType: const FullType(double)) as double; break; case 'refunded': result.refunded = serializers.deserialize(value, specifiedType: const FullType(double)) as double; break; case 'number': result.number = serializers.deserialize(value, specifiedType: const FullType(String)) as String; break; case 'client_id': result.clientId = serializers.deserialize(value, specifiedType: const FullType(String)) as String; break; case 'status_id': result.statusId = serializers.deserialize(value, specifiedType: const FullType(String)) as String; break; case 'transaction_reference': result.transactionReference = serializers.deserialize(value, specifiedType: const FullType(String)) as String; break; case 'date': result.date = serializers.deserialize(value, specifiedType: const FullType(String)) as String; break; case 'type_id': result.typeId = serializers.deserialize(value, specifiedType: const FullType(String)) as String; break; case 'invoice_id': result.invoiceId = serializers.deserialize(value, specifiedType: const FullType(String)) as String; break; case 'private_notes': result.privateNotes = serializers.deserialize(value, specifiedType: const FullType(String)) as String; break; case 'custom_value1': result.customValue1 = serializers.deserialize(value, specifiedType: const FullType(String)) as String; break; case 'custom_value2': result.customValue2 = serializers.deserialize(value, specifiedType: const FullType(String)) as String; break; case 'custom_value3': result.customValue3 = serializers.deserialize(value, specifiedType: const FullType(String)) as String; break; case 'custom_value4': result.customValue4 = serializers.deserialize(value, specifiedType: const FullType(String)) as String; break; case 'exchange_rate': result.exchangeRate = serializers.deserialize(value, specifiedType: const FullType(double)) as double; break; case 'exchange_currency_id': result.exchangeCurrencyId = serializers.deserialize(value, specifiedType: const FullType(String)) as String; break; case 'is_manual': result.isManual = serializers.deserialize(value, specifiedType: const FullType(bool)) as bool; break; case 'isChanged': result.isChanged = serializers.deserialize(value, specifiedType: const FullType(bool)) as bool; break; case 'created_at': result.createdAt = serializers.deserialize(value, specifiedType: const FullType(int)) as int; break; case 'updated_at': result.updatedAt = serializers.deserialize(value, specifiedType: const FullType(int)) as int; break; case 'archived_at': result.archivedAt = serializers.deserialize(value, specifiedType: const FullType(int)) as int; break; case 'is_deleted': result.isDeleted = serializers.deserialize(value, specifiedType: const FullType(bool)) as bool; break; case 'user_id': result.createdUserId = serializers.deserialize(value, specifiedType: const FullType(String)) as String; break; case 'assigned_user_id': result.assignedUserId = serializers.deserialize(value, specifiedType: const FullType(String)) as String; break; case 'id': result.id = serializers.deserialize(value, specifiedType: const FullType(String)) as String; break; } } return result.build(); } } class _$PaymentListResponse extends PaymentListResponse { @override final BuiltList data; factory _$PaymentListResponse( [void Function(PaymentListResponseBuilder) updates]) => (new PaymentListResponseBuilder()..update(updates)).build(); _$PaymentListResponse._({this.data}) : super._() { if (data == null) { throw new BuiltValueNullFieldError('PaymentListResponse', 'data'); } } @override PaymentListResponse rebuild( void Function(PaymentListResponseBuilder) updates) => (toBuilder()..update(updates)).build(); @override PaymentListResponseBuilder toBuilder() => new PaymentListResponseBuilder()..replace(this); @override bool operator ==(Object other) { if (identical(other, this)) return true; return other is PaymentListResponse && data == other.data; } @override int get hashCode { return $jf($jc(0, data.hashCode)); } @override String toString() { return (newBuiltValueToStringHelper('PaymentListResponse') ..add('data', data)) .toString(); } } class PaymentListResponseBuilder implements Builder { _$PaymentListResponse _$v; ListBuilder _data; ListBuilder get data => _$this._data ??= new ListBuilder(); set data(ListBuilder data) => _$this._data = data; PaymentListResponseBuilder(); PaymentListResponseBuilder get _$this { if (_$v != null) { _data = _$v.data?.toBuilder(); _$v = null; } return this; } @override void replace(PaymentListResponse other) { if (other == null) { throw new ArgumentError.notNull('other'); } _$v = other as _$PaymentListResponse; } @override void update(void Function(PaymentListResponseBuilder) updates) { if (updates != null) updates(this); } @override _$PaymentListResponse build() { _$PaymentListResponse _$result; try { _$result = _$v ?? new _$PaymentListResponse._(data: data.build()); } catch (_) { String _$failedField; try { _$failedField = 'data'; data.build(); } catch (e) { throw new BuiltValueNestedFieldError( 'PaymentListResponse', _$failedField, e.toString()); } rethrow; } replace(_$result); return _$result; } } class _$PaymentItemResponse extends PaymentItemResponse { @override final PaymentEntity data; factory _$PaymentItemResponse( [void Function(PaymentItemResponseBuilder) updates]) => (new PaymentItemResponseBuilder()..update(updates)).build(); _$PaymentItemResponse._({this.data}) : super._() { if (data == null) { throw new BuiltValueNullFieldError('PaymentItemResponse', 'data'); } } @override PaymentItemResponse rebuild( void Function(PaymentItemResponseBuilder) updates) => (toBuilder()..update(updates)).build(); @override PaymentItemResponseBuilder toBuilder() => new PaymentItemResponseBuilder()..replace(this); @override bool operator ==(Object other) { if (identical(other, this)) return true; return other is PaymentItemResponse && data == other.data; } @override int get hashCode { return $jf($jc(0, data.hashCode)); } @override String toString() { return (newBuiltValueToStringHelper('PaymentItemResponse') ..add('data', data)) .toString(); } } class PaymentItemResponseBuilder implements Builder { _$PaymentItemResponse _$v; PaymentEntityBuilder _data; PaymentEntityBuilder get data => _$this._data ??= new PaymentEntityBuilder(); set data(PaymentEntityBuilder data) => _$this._data = data; PaymentItemResponseBuilder(); PaymentItemResponseBuilder get _$this { if (_$v != null) { _data = _$v.data?.toBuilder(); _$v = null; } return this; } @override void replace(PaymentItemResponse other) { if (other == null) { throw new ArgumentError.notNull('other'); } _$v = other as _$PaymentItemResponse; } @override void update(void Function(PaymentItemResponseBuilder) updates) { if (updates != null) updates(this); } @override _$PaymentItemResponse build() { _$PaymentItemResponse _$result; try { _$result = _$v ?? new _$PaymentItemResponse._(data: data.build()); } catch (_) { String _$failedField; try { _$failedField = 'data'; data.build(); } catch (e) { throw new BuiltValueNestedFieldError( 'PaymentItemResponse', _$failedField, e.toString()); } rethrow; } replace(_$result); return _$result; } } class _$PaymentEntity extends PaymentEntity { @override final double amount; @override final double refunded; @override final String number; @override final String clientId; @override final String statusId; @override final String transactionReference; @override final String date; @override final String typeId; @override final String invoiceId; @override final String privateNotes; @override final String customValue1; @override final String customValue2; @override final String customValue3; @override final String customValue4; @override final double exchangeRate; @override final String exchangeCurrencyId; @override final bool isManual; @override final bool isChanged; @override final int createdAt; @override final int updatedAt; @override final int archivedAt; @override final bool isDeleted; @override final String createdUserId; @override final String assignedUserId; @override final String id; factory _$PaymentEntity([void Function(PaymentEntityBuilder) updates]) => (new PaymentEntityBuilder()..update(updates)).build(); _$PaymentEntity._( {this.amount, this.refunded, this.number, this.clientId, this.statusId, this.transactionReference, this.date, this.typeId, this.invoiceId, this.privateNotes, this.customValue1, this.customValue2, this.customValue3, this.customValue4, this.exchangeRate, this.exchangeCurrencyId, this.isManual, this.isChanged, this.createdAt, this.updatedAt, this.archivedAt, this.isDeleted, this.createdUserId, this.assignedUserId, this.id}) : super._() { if (amount == null) { throw new BuiltValueNullFieldError('PaymentEntity', 'amount'); } if (refunded == null) { throw new BuiltValueNullFieldError('PaymentEntity', 'refunded'); } if (transactionReference == null) { throw new BuiltValueNullFieldError( 'PaymentEntity', 'transactionReference'); } if (date == null) { throw new BuiltValueNullFieldError('PaymentEntity', 'date'); } if (typeId == null) { throw new BuiltValueNullFieldError('PaymentEntity', 'typeId'); } if (isManual == null) { throw new BuiltValueNullFieldError('PaymentEntity', 'isManual'); } } @override PaymentEntity rebuild(void Function(PaymentEntityBuilder) updates) => (toBuilder()..update(updates)).build(); @override PaymentEntityBuilder toBuilder() => new PaymentEntityBuilder()..replace(this); @override bool operator ==(Object other) { if (identical(other, this)) return true; return other is PaymentEntity && amount == other.amount && refunded == other.refunded && number == other.number && clientId == other.clientId && statusId == other.statusId && transactionReference == other.transactionReference && date == other.date && typeId == other.typeId && invoiceId == other.invoiceId && privateNotes == other.privateNotes && customValue1 == other.customValue1 && customValue2 == other.customValue2 && customValue3 == other.customValue3 && customValue4 == other.customValue4 && exchangeRate == other.exchangeRate && exchangeCurrencyId == other.exchangeCurrencyId && isManual == other.isManual && isChanged == other.isChanged && createdAt == other.createdAt && updatedAt == other.updatedAt && archivedAt == other.archivedAt && isDeleted == other.isDeleted && createdUserId == other.createdUserId && assignedUserId == other.assignedUserId && id == other.id; } @override int get hashCode { return $jf($jc( $jc( $jc( $jc( $jc( $jc( $jc( $jc( $jc( $jc( $jc( $jc( $jc( $jc( $jc( $jc( $jc( $jc( $jc($jc($jc($jc($jc($jc($jc(0, amount.hashCode), refunded.hashCode), number.hashCode), clientId.hashCode), statusId.hashCode), transactionReference.hashCode), date.hashCode), typeId.hashCode), invoiceId.hashCode), privateNotes.hashCode), customValue1.hashCode), customValue2.hashCode), customValue3.hashCode), customValue4.hashCode), exchangeRate.hashCode), exchangeCurrencyId.hashCode), isManual.hashCode), isChanged.hashCode), createdAt.hashCode), updatedAt.hashCode), archivedAt.hashCode), isDeleted.hashCode), createdUserId.hashCode), assignedUserId.hashCode), id.hashCode)); } @override String toString() { return (newBuiltValueToStringHelper('PaymentEntity') ..add('amount', amount) ..add('refunded', refunded) ..add('number', number) ..add('clientId', clientId) ..add('statusId', statusId) ..add('transactionReference', transactionReference) ..add('date', date) ..add('typeId', typeId) ..add('invoiceId', invoiceId) ..add('privateNotes', privateNotes) ..add('customValue1', customValue1) ..add('customValue2', customValue2) ..add('customValue3', customValue3) ..add('customValue4', customValue4) ..add('exchangeRate', exchangeRate) ..add('exchangeCurrencyId', exchangeCurrencyId) ..add('isManual', isManual) ..add('isChanged', isChanged) ..add('createdAt', createdAt) ..add('updatedAt', updatedAt) ..add('archivedAt', archivedAt) ..add('isDeleted', isDeleted) ..add('createdUserId', createdUserId) ..add('assignedUserId', assignedUserId) ..add('id', id)) .toString(); } } class PaymentEntityBuilder implements Builder { _$PaymentEntity _$v; double _amount; double get amount => _$this._amount; set amount(double amount) => _$this._amount = amount; double _refunded; double get refunded => _$this._refunded; set refunded(double refunded) => _$this._refunded = refunded; String _number; String get number => _$this._number; set number(String number) => _$this._number = number; String _clientId; String get clientId => _$this._clientId; set clientId(String clientId) => _$this._clientId = clientId; String _statusId; String get statusId => _$this._statusId; set statusId(String statusId) => _$this._statusId = statusId; String _transactionReference; String get transactionReference => _$this._transactionReference; set transactionReference(String transactionReference) => _$this._transactionReference = transactionReference; String _date; String get date => _$this._date; set date(String date) => _$this._date = date; String _typeId; String get typeId => _$this._typeId; set typeId(String typeId) => _$this._typeId = typeId; String _invoiceId; String get invoiceId => _$this._invoiceId; set invoiceId(String invoiceId) => _$this._invoiceId = invoiceId; String _privateNotes; String get privateNotes => _$this._privateNotes; set privateNotes(String privateNotes) => _$this._privateNotes = privateNotes; String _customValue1; String get customValue1 => _$this._customValue1; set customValue1(String customValue1) => _$this._customValue1 = customValue1; String _customValue2; String get customValue2 => _$this._customValue2; set customValue2(String customValue2) => _$this._customValue2 = customValue2; String _customValue3; String get customValue3 => _$this._customValue3; set customValue3(String customValue3) => _$this._customValue3 = customValue3; String _customValue4; String get customValue4 => _$this._customValue4; set customValue4(String customValue4) => _$this._customValue4 = customValue4; double _exchangeRate; double get exchangeRate => _$this._exchangeRate; set exchangeRate(double exchangeRate) => _$this._exchangeRate = exchangeRate; String _exchangeCurrencyId; String get exchangeCurrencyId => _$this._exchangeCurrencyId; set exchangeCurrencyId(String exchangeCurrencyId) => _$this._exchangeCurrencyId = exchangeCurrencyId; bool _isManual; bool get isManual => _$this._isManual; set isManual(bool isManual) => _$this._isManual = isManual; bool _isChanged; bool get isChanged => _$this._isChanged; set isChanged(bool isChanged) => _$this._isChanged = isChanged; int _createdAt; int get createdAt => _$this._createdAt; set createdAt(int createdAt) => _$this._createdAt = createdAt; int _updatedAt; int get updatedAt => _$this._updatedAt; set updatedAt(int updatedAt) => _$this._updatedAt = updatedAt; int _archivedAt; int get archivedAt => _$this._archivedAt; set archivedAt(int archivedAt) => _$this._archivedAt = archivedAt; bool _isDeleted; bool get isDeleted => _$this._isDeleted; set isDeleted(bool isDeleted) => _$this._isDeleted = isDeleted; String _createdUserId; String get createdUserId => _$this._createdUserId; set createdUserId(String createdUserId) => _$this._createdUserId = createdUserId; String _assignedUserId; String get assignedUserId => _$this._assignedUserId; set assignedUserId(String assignedUserId) => _$this._assignedUserId = assignedUserId; String _id; String get id => _$this._id; set id(String id) => _$this._id = id; PaymentEntityBuilder(); PaymentEntityBuilder get _$this { if (_$v != null) { _amount = _$v.amount; _refunded = _$v.refunded; _number = _$v.number; _clientId = _$v.clientId; _statusId = _$v.statusId; _transactionReference = _$v.transactionReference; _date = _$v.date; _typeId = _$v.typeId; _invoiceId = _$v.invoiceId; _privateNotes = _$v.privateNotes; _customValue1 = _$v.customValue1; _customValue2 = _$v.customValue2; _customValue3 = _$v.customValue3; _customValue4 = _$v.customValue4; _exchangeRate = _$v.exchangeRate; _exchangeCurrencyId = _$v.exchangeCurrencyId; _isManual = _$v.isManual; _isChanged = _$v.isChanged; _createdAt = _$v.createdAt; _updatedAt = _$v.updatedAt; _archivedAt = _$v.archivedAt; _isDeleted = _$v.isDeleted; _createdUserId = _$v.createdUserId; _assignedUserId = _$v.assignedUserId; _id = _$v.id; _$v = null; } return this; } @override void replace(PaymentEntity other) { if (other == null) { throw new ArgumentError.notNull('other'); } _$v = other as _$PaymentEntity; } @override void update(void Function(PaymentEntityBuilder) updates) { if (updates != null) updates(this); } @override _$PaymentEntity build() { final _$result = _$v ?? new _$PaymentEntity._( amount: amount, refunded: refunded, number: number, clientId: clientId, statusId: statusId, transactionReference: transactionReference, date: date, typeId: typeId, invoiceId: invoiceId, privateNotes: privateNotes, customValue1: customValue1, customValue2: customValue2, customValue3: customValue3, customValue4: customValue4, exchangeRate: exchangeRate, exchangeCurrencyId: exchangeCurrencyId, isManual: isManual, isChanged: isChanged, createdAt: createdAt, updatedAt: updatedAt, archivedAt: archivedAt, isDeleted: isDeleted, createdUserId: createdUserId, assignedUserId: assignedUserId, id: id); replace(_$result); return _$result; } } // ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,lines_longer_than_80_chars,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new