invoice/lib/redux/dashboard/dashboard_state.g.dart

195 lines
5.5 KiB
Dart

// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'dashboard_state.dart';
// **************************************************************************
// Generator: 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_returning_this
// ignore_for_file: omit_local_variable_types
// ignore_for_file: prefer_expression_function_bodies
// ignore_for_file: sort_constructors_first
Serializer<DashboardState> _$dashboardStateSerializer =
new _$DashboardStateSerializer();
class _$DashboardStateSerializer
implements StructuredSerializer<DashboardState> {
@override
final Iterable<Type> types = const [DashboardState, _$DashboardState];
@override
final String wireName = 'DashboardState';
@override
Iterable serialize(Serializers serializers, DashboardState object,
{FullType specifiedType: FullType.unspecified}) {
final result = <Object>[
'isLoading',
serializers.serialize(object.isLoading,
specifiedType: const FullType(bool)),
'lastUpdated',
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 'isLoading':
result.isLoading = serializers.deserialize(value,
specifiedType: const FullType(bool)) as bool;
break;
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 bool isLoading;
@override
final int lastUpdated;
@override
final DashboardEntity data;
factory _$DashboardState([void updates(DashboardStateBuilder b)]) =>
(new DashboardStateBuilder()..update(updates)).build();
_$DashboardState._({this.isLoading, this.lastUpdated, this.data})
: super._() {
if (isLoading == null)
throw new BuiltValueNullFieldError('DashboardState', 'isLoading');
if (lastUpdated == null)
throw new BuiltValueNullFieldError('DashboardState', 'lastUpdated');
}
@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 isLoading == other.isLoading &&
lastUpdated == other.lastUpdated &&
data == other.data;
}
@override
int get hashCode {
return $jf($jc(
$jc($jc(0, isLoading.hashCode), lastUpdated.hashCode), data.hashCode));
}
@override
String toString() {
return (newBuiltValueToStringHelper('DashboardState')
..add('isLoading', isLoading)
..add('lastUpdated', lastUpdated)
..add('data', data))
.toString();
}
}
class DashboardStateBuilder
implements Builder<DashboardState, DashboardStateBuilder> {
_$DashboardState _$v;
bool _isLoading;
bool get isLoading => _$this._isLoading;
set isLoading(bool isLoading) => _$this._isLoading = isLoading;
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) {
_isLoading = _$v.isLoading;
_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._(
isLoading: isLoading,
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;
}
}