// GENERATED CODE - DO NOT MODIFY BY HAND part of 'dashboard_state.dart'; // ************************************************************************** // BuiltValueGenerator // ************************************************************************** // ignore_for_file: always_put_control_body_on_new_line // ignore_for_file: annotate_overrides // ignore_for_file: avoid_annotating_with_dynamic // ignore_for_file: avoid_catches_without_on_clauses // ignore_for_file: avoid_returning_this // ignore_for_file: lines_longer_than_80_chars // ignore_for_file: omit_local_variable_types // ignore_for_file: prefer_expression_function_bodies // ignore_for_file: sort_constructors_first Serializer _$dashboardStateSerializer = new _$DashboardStateSerializer(); class _$DashboardStateSerializer implements StructuredSerializer { @override final Iterable types = const [DashboardState, _$DashboardState]; @override final String wireName = 'DashboardState'; @override Iterable serialize(Serializers serializers, DashboardState object, {FullType specifiedType = FullType.unspecified}) { final result = []; if (object.lastUpdated != null) { result ..add('lastUpdated') ..add(serializers.serialize(object.lastUpdated, specifiedType: const FullType(int))); } if (object.data != null) { result ..add('data') ..add(serializers.serialize(object.data, specifiedType: const FullType(DashboardEntity))); } return result; } @override DashboardState deserialize(Serializers serializers, Iterable serialized, {FullType specifiedType = FullType.unspecified}) { final result = new DashboardStateBuilder(); final iterator = serialized.iterator; while (iterator.moveNext()) { final key = iterator.current as String; iterator.moveNext(); final dynamic value = iterator.current; switch (key) { case 'lastUpdated': result.lastUpdated = serializers.deserialize(value, specifiedType: const FullType(int)) as int; break; case 'data': result.data.replace(serializers.deserialize(value, specifiedType: const FullType(DashboardEntity)) as DashboardEntity); break; } } return result.build(); } } class _$DashboardState extends DashboardState { @override final int lastUpdated; @override final DashboardEntity data; factory _$DashboardState([void updates(DashboardStateBuilder b)]) => (new DashboardStateBuilder()..update(updates)).build(); _$DashboardState._({this.lastUpdated, this.data}) : super._(); @override DashboardState rebuild(void updates(DashboardStateBuilder b)) => (toBuilder()..update(updates)).build(); @override DashboardStateBuilder toBuilder() => new DashboardStateBuilder()..replace(this); @override bool operator ==(dynamic other) { if (identical(other, this)) return true; if (other is! DashboardState) return false; return lastUpdated == other.lastUpdated && data == other.data; } @override int get hashCode { return $jf($jc($jc(0, lastUpdated.hashCode), data.hashCode)); } @override String toString() { return (newBuiltValueToStringHelper('DashboardState') ..add('lastUpdated', lastUpdated) ..add('data', data)) .toString(); } } class DashboardStateBuilder implements Builder { _$DashboardState _$v; int _lastUpdated; int get lastUpdated => _$this._lastUpdated; set lastUpdated(int lastUpdated) => _$this._lastUpdated = lastUpdated; DashboardEntityBuilder _data; DashboardEntityBuilder get data => _$this._data ??= new DashboardEntityBuilder(); set data(DashboardEntityBuilder data) => _$this._data = data; DashboardStateBuilder(); DashboardStateBuilder get _$this { if (_$v != null) { _lastUpdated = _$v.lastUpdated; _data = _$v.data?.toBuilder(); _$v = null; } return this; } @override void replace(DashboardState other) { if (other == null) throw new ArgumentError.notNull('other'); _$v = other as _$DashboardState; } @override void update(void updates(DashboardStateBuilder b)) { if (updates != null) updates(this); } @override _$DashboardState build() { _$DashboardState _$result; try { _$result = _$v ?? new _$DashboardState._( lastUpdated: lastUpdated, data: _data?.build()); } catch (_) { String _$failedField; try { _$failedField = 'data'; _data?.build(); } catch (e) { throw new BuiltValueNestedFieldError( 'DashboardState', _$failedField, e.toString()); } rethrow; } replace(_$result); return _$result; } }