diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a6ffcdb2..43f0117b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -20,7 +20,7 @@ jobs: uses: subosito/flutter-action@v2 with: channel: "stable" - flutter-version: "3.32.1" + flutter-version: "3.32.2" - uses: actions/setup-java@v4 with: distribution: "zulu" diff --git a/lib/data/model/app/bak/backup2.freezed.dart b/lib/data/model/app/bak/backup2.freezed.dart index 231d849a..c6d7af5e 100644 --- a/lib/data/model/app/bak/backup2.freezed.dart +++ b/lib/data/model/app/bak/backup2.freezed.dart @@ -1,3 +1,4 @@ +// dart format width=80 // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint @@ -9,364 +10,196 @@ part of 'backup2.dart'; // FreezedGenerator // ************************************************************************** +// dart format off T _$identity(T value) => value; -final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models', -); - -BackupV2 _$BackupV2FromJson(Map json) { - return _BackupV2.fromJson(json); -} - /// @nodoc mixin _$BackupV2 { - int get version => throw _privateConstructorUsedError; - int get date => throw _privateConstructorUsedError; - Map get spis => throw _privateConstructorUsedError; - Map get snippets => throw _privateConstructorUsedError; - Map get keys => throw _privateConstructorUsedError; - Map get container => throw _privateConstructorUsedError; - Map get history => throw _privateConstructorUsedError; - Map get settings => throw _privateConstructorUsedError; + + int get version; int get date; Map get spis; Map get snippets; Map get keys; Map get container; Map get history; Map get settings; +/// Create a copy of BackupV2 +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$BackupV2CopyWith get copyWith => _$BackupV2CopyWithImpl(this as BackupV2, _$identity); /// Serializes this BackupV2 to a JSON map. - Map toJson() => throw _privateConstructorUsedError; + Map toJson(); + + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is BackupV2&&(identical(other.version, version) || other.version == version)&&(identical(other.date, date) || other.date == date)&&const DeepCollectionEquality().equals(other.spis, spis)&&const DeepCollectionEquality().equals(other.snippets, snippets)&&const DeepCollectionEquality().equals(other.keys, keys)&&const DeepCollectionEquality().equals(other.container, container)&&const DeepCollectionEquality().equals(other.history, history)&&const DeepCollectionEquality().equals(other.settings, settings)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,version,date,const DeepCollectionEquality().hash(spis),const DeepCollectionEquality().hash(snippets),const DeepCollectionEquality().hash(keys),const DeepCollectionEquality().hash(container),const DeepCollectionEquality().hash(history),const DeepCollectionEquality().hash(settings)); + +@override +String toString() { + return 'BackupV2(version: $version, date: $date, spis: $spis, snippets: $snippets, keys: $keys, container: $container, history: $history, settings: $settings)'; +} + - /// Create a copy of BackupV2 - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - $BackupV2CopyWith get copyWith => - throw _privateConstructorUsedError; } /// @nodoc -abstract class $BackupV2CopyWith<$Res> { - factory $BackupV2CopyWith(BackupV2 value, $Res Function(BackupV2) then) = - _$BackupV2CopyWithImpl<$Res, BackupV2>; - @useResult - $Res call({ - int version, - int date, - Map spis, - Map snippets, - Map keys, - Map container, - Map history, - Map settings, - }); -} +abstract mixin class $BackupV2CopyWith<$Res> { + factory $BackupV2CopyWith(BackupV2 value, $Res Function(BackupV2) _then) = _$BackupV2CopyWithImpl; +@useResult +$Res call({ + int version, int date, Map spis, Map snippets, Map keys, Map container, Map history, Map settings +}); + + + +} /// @nodoc -class _$BackupV2CopyWithImpl<$Res, $Val extends BackupV2> +class _$BackupV2CopyWithImpl<$Res> implements $BackupV2CopyWith<$Res> { - _$BackupV2CopyWithImpl(this._value, this._then); + _$BackupV2CopyWithImpl(this._self, this._then); - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; + final BackupV2 _self; + final $Res Function(BackupV2) _then; - /// Create a copy of BackupV2 - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? version = null, - Object? date = null, - Object? spis = null, - Object? snippets = null, - Object? keys = null, - Object? container = null, - Object? history = null, - Object? settings = null, - }) { - return _then( - _value.copyWith( - version: null == version - ? _value.version - : version // ignore: cast_nullable_to_non_nullable - as int, - date: null == date - ? _value.date - : date // ignore: cast_nullable_to_non_nullable - as int, - spis: null == spis - ? _value.spis - : spis // ignore: cast_nullable_to_non_nullable - as Map, - snippets: null == snippets - ? _value.snippets - : snippets // ignore: cast_nullable_to_non_nullable - as Map, - keys: null == keys - ? _value.keys - : keys // ignore: cast_nullable_to_non_nullable - as Map, - container: null == container - ? _value.container - : container // ignore: cast_nullable_to_non_nullable - as Map, - history: null == history - ? _value.history - : history // ignore: cast_nullable_to_non_nullable - as Map, - settings: null == settings - ? _value.settings - : settings // ignore: cast_nullable_to_non_nullable - as Map, - ) - as $Val, - ); - } +/// Create a copy of BackupV2 +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? version = null,Object? date = null,Object? spis = null,Object? snippets = null,Object? keys = null,Object? container = null,Object? history = null,Object? settings = null,}) { + return _then(_self.copyWith( +version: null == version ? _self.version : version // ignore: cast_nullable_to_non_nullable +as int,date: null == date ? _self.date : date // ignore: cast_nullable_to_non_nullable +as int,spis: null == spis ? _self.spis : spis // ignore: cast_nullable_to_non_nullable +as Map,snippets: null == snippets ? _self.snippets : snippets // ignore: cast_nullable_to_non_nullable +as Map,keys: null == keys ? _self.keys : keys // ignore: cast_nullable_to_non_nullable +as Map,container: null == container ? _self.container : container // ignore: cast_nullable_to_non_nullable +as Map,history: null == history ? _self.history : history // ignore: cast_nullable_to_non_nullable +as Map,settings: null == settings ? _self.settings : settings // ignore: cast_nullable_to_non_nullable +as Map, + )); } -/// @nodoc -abstract class _$$BackupV2ImplCopyWith<$Res> - implements $BackupV2CopyWith<$Res> { - factory _$$BackupV2ImplCopyWith( - _$BackupV2Impl value, - $Res Function(_$BackupV2Impl) then, - ) = __$$BackupV2ImplCopyWithImpl<$Res>; - @override - @useResult - $Res call({ - int version, - int date, - Map spis, - Map snippets, - Map keys, - Map container, - Map history, - Map settings, - }); } -/// @nodoc -class __$$BackupV2ImplCopyWithImpl<$Res> - extends _$BackupV2CopyWithImpl<$Res, _$BackupV2Impl> - implements _$$BackupV2ImplCopyWith<$Res> { - __$$BackupV2ImplCopyWithImpl( - _$BackupV2Impl _value, - $Res Function(_$BackupV2Impl) _then, - ) : super(_value, _then); - - /// Create a copy of BackupV2 - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? version = null, - Object? date = null, - Object? spis = null, - Object? snippets = null, - Object? keys = null, - Object? container = null, - Object? history = null, - Object? settings = null, - }) { - return _then( - _$BackupV2Impl( - version: null == version - ? _value.version - : version // ignore: cast_nullable_to_non_nullable - as int, - date: null == date - ? _value.date - : date // ignore: cast_nullable_to_non_nullable - as int, - spis: null == spis - ? _value._spis - : spis // ignore: cast_nullable_to_non_nullable - as Map, - snippets: null == snippets - ? _value._snippets - : snippets // ignore: cast_nullable_to_non_nullable - as Map, - keys: null == keys - ? _value._keys - : keys // ignore: cast_nullable_to_non_nullable - as Map, - container: null == container - ? _value._container - : container // ignore: cast_nullable_to_non_nullable - as Map, - history: null == history - ? _value._history - : history // ignore: cast_nullable_to_non_nullable - as Map, - settings: null == settings - ? _value._settings - : settings // ignore: cast_nullable_to_non_nullable - as Map, - ), - ); - } -} /// @nodoc @JsonSerializable() -class _$BackupV2Impl extends _BackupV2 { - const _$BackupV2Impl({ - required this.version, - required this.date, - required final Map spis, - required final Map snippets, - required final Map keys, - required final Map container, - required final Map history, - required final Map settings, - }) : _spis = spis, - _snippets = snippets, - _keys = keys, - _container = container, - _history = history, - _settings = settings, - super._(); - factory _$BackupV2Impl.fromJson(Map json) => - _$$BackupV2ImplFromJson(json); +class _BackupV2 extends BackupV2 { + const _BackupV2({required this.version, required this.date, required final Map spis, required final Map snippets, required final Map keys, required final Map container, required final Map history, required final Map settings}): _spis = spis,_snippets = snippets,_keys = keys,_container = container,_history = history,_settings = settings,super._(); + factory _BackupV2.fromJson(Map json) => _$BackupV2FromJson(json); - @override - final int version; - @override - final int date; - final Map _spis; - @override - Map get spis { - if (_spis is EqualUnmodifiableMapView) return _spis; - // ignore: implicit_dynamic_type - return EqualUnmodifiableMapView(_spis); - } - - final Map _snippets; - @override - Map get snippets { - if (_snippets is EqualUnmodifiableMapView) return _snippets; - // ignore: implicit_dynamic_type - return EqualUnmodifiableMapView(_snippets); - } - - final Map _keys; - @override - Map get keys { - if (_keys is EqualUnmodifiableMapView) return _keys; - // ignore: implicit_dynamic_type - return EqualUnmodifiableMapView(_keys); - } - - final Map _container; - @override - Map get container { - if (_container is EqualUnmodifiableMapView) return _container; - // ignore: implicit_dynamic_type - return EqualUnmodifiableMapView(_container); - } - - final Map _history; - @override - Map get history { - if (_history is EqualUnmodifiableMapView) return _history; - // ignore: implicit_dynamic_type - return EqualUnmodifiableMapView(_history); - } - - final Map _settings; - @override - Map get settings { - if (_settings is EqualUnmodifiableMapView) return _settings; - // ignore: implicit_dynamic_type - return EqualUnmodifiableMapView(_settings); - } - - @override - String toString() { - return 'BackupV2(version: $version, date: $date, spis: $spis, snippets: $snippets, keys: $keys, container: $container, history: $history, settings: $settings)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$BackupV2Impl && - (identical(other.version, version) || other.version == version) && - (identical(other.date, date) || other.date == date) && - const DeepCollectionEquality().equals(other._spis, _spis) && - const DeepCollectionEquality().equals(other._snippets, _snippets) && - const DeepCollectionEquality().equals(other._keys, _keys) && - const DeepCollectionEquality().equals( - other._container, - _container, - ) && - const DeepCollectionEquality().equals(other._history, _history) && - const DeepCollectionEquality().equals(other._settings, _settings)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash( - runtimeType, - version, - date, - const DeepCollectionEquality().hash(_spis), - const DeepCollectionEquality().hash(_snippets), - const DeepCollectionEquality().hash(_keys), - const DeepCollectionEquality().hash(_container), - const DeepCollectionEquality().hash(_history), - const DeepCollectionEquality().hash(_settings), - ); - - /// Create a copy of BackupV2 - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @override - @pragma('vm:prefer-inline') - _$$BackupV2ImplCopyWith<_$BackupV2Impl> get copyWith => - __$$BackupV2ImplCopyWithImpl<_$BackupV2Impl>(this, _$identity); - - @override - Map toJson() { - return _$$BackupV2ImplToJson(this); - } +@override final int version; +@override final int date; + final Map _spis; +@override Map get spis { + if (_spis is EqualUnmodifiableMapView) return _spis; + // ignore: implicit_dynamic_type + return EqualUnmodifiableMapView(_spis); } -abstract class _BackupV2 extends BackupV2 { - const factory _BackupV2({ - required final int version, - required final int date, - required final Map spis, - required final Map snippets, - required final Map keys, - required final Map container, - required final Map history, - required final Map settings, - }) = _$BackupV2Impl; - const _BackupV2._() : super._(); - - factory _BackupV2.fromJson(Map json) = - _$BackupV2Impl.fromJson; - - @override - int get version; - @override - int get date; - @override - Map get spis; - @override - Map get snippets; - @override - Map get keys; - @override - Map get container; - @override - Map get history; - @override - Map get settings; - - /// Create a copy of BackupV2 - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$BackupV2ImplCopyWith<_$BackupV2Impl> get copyWith => - throw _privateConstructorUsedError; + final Map _snippets; +@override Map get snippets { + if (_snippets is EqualUnmodifiableMapView) return _snippets; + // ignore: implicit_dynamic_type + return EqualUnmodifiableMapView(_snippets); } + + final Map _keys; +@override Map get keys { + if (_keys is EqualUnmodifiableMapView) return _keys; + // ignore: implicit_dynamic_type + return EqualUnmodifiableMapView(_keys); +} + + final Map _container; +@override Map get container { + if (_container is EqualUnmodifiableMapView) return _container; + // ignore: implicit_dynamic_type + return EqualUnmodifiableMapView(_container); +} + + final Map _history; +@override Map get history { + if (_history is EqualUnmodifiableMapView) return _history; + // ignore: implicit_dynamic_type + return EqualUnmodifiableMapView(_history); +} + + final Map _settings; +@override Map get settings { + if (_settings is EqualUnmodifiableMapView) return _settings; + // ignore: implicit_dynamic_type + return EqualUnmodifiableMapView(_settings); +} + + +/// Create a copy of BackupV2 +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$BackupV2CopyWith<_BackupV2> get copyWith => __$BackupV2CopyWithImpl<_BackupV2>(this, _$identity); + +@override +Map toJson() { + return _$BackupV2ToJson(this, ); +} + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _BackupV2&&(identical(other.version, version) || other.version == version)&&(identical(other.date, date) || other.date == date)&&const DeepCollectionEquality().equals(other._spis, _spis)&&const DeepCollectionEquality().equals(other._snippets, _snippets)&&const DeepCollectionEquality().equals(other._keys, _keys)&&const DeepCollectionEquality().equals(other._container, _container)&&const DeepCollectionEquality().equals(other._history, _history)&&const DeepCollectionEquality().equals(other._settings, _settings)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,version,date,const DeepCollectionEquality().hash(_spis),const DeepCollectionEquality().hash(_snippets),const DeepCollectionEquality().hash(_keys),const DeepCollectionEquality().hash(_container),const DeepCollectionEquality().hash(_history),const DeepCollectionEquality().hash(_settings)); + +@override +String toString() { + return 'BackupV2(version: $version, date: $date, spis: $spis, snippets: $snippets, keys: $keys, container: $container, history: $history, settings: $settings)'; +} + + +} + +/// @nodoc +abstract mixin class _$BackupV2CopyWith<$Res> implements $BackupV2CopyWith<$Res> { + factory _$BackupV2CopyWith(_BackupV2 value, $Res Function(_BackupV2) _then) = __$BackupV2CopyWithImpl; +@override @useResult +$Res call({ + int version, int date, Map spis, Map snippets, Map keys, Map container, Map history, Map settings +}); + + + + +} +/// @nodoc +class __$BackupV2CopyWithImpl<$Res> + implements _$BackupV2CopyWith<$Res> { + __$BackupV2CopyWithImpl(this._self, this._then); + + final _BackupV2 _self; + final $Res Function(_BackupV2) _then; + +/// Create a copy of BackupV2 +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? version = null,Object? date = null,Object? spis = null,Object? snippets = null,Object? keys = null,Object? container = null,Object? history = null,Object? settings = null,}) { + return _then(_BackupV2( +version: null == version ? _self.version : version // ignore: cast_nullable_to_non_nullable +as int,date: null == date ? _self.date : date // ignore: cast_nullable_to_non_nullable +as int,spis: null == spis ? _self._spis : spis // ignore: cast_nullable_to_non_nullable +as Map,snippets: null == snippets ? _self._snippets : snippets // ignore: cast_nullable_to_non_nullable +as Map,keys: null == keys ? _self._keys : keys // ignore: cast_nullable_to_non_nullable +as Map,container: null == container ? _self._container : container // ignore: cast_nullable_to_non_nullable +as Map,history: null == history ? _self._history : history // ignore: cast_nullable_to_non_nullable +as Map,settings: null == settings ? _self._settings : settings // ignore: cast_nullable_to_non_nullable +as Map, + )); +} + + +} + +// dart format on diff --git a/lib/data/model/app/bak/backup2.g.dart b/lib/data/model/app/bak/backup2.g.dart index 0055cba4..c1f1b3fe 100644 --- a/lib/data/model/app/bak/backup2.g.dart +++ b/lib/data/model/app/bak/backup2.g.dart @@ -6,26 +6,24 @@ part of 'backup2.dart'; // JsonSerializableGenerator // ************************************************************************** -_$BackupV2Impl _$$BackupV2ImplFromJson(Map json) => - _$BackupV2Impl( - version: (json['version'] as num).toInt(), - date: (json['date'] as num).toInt(), - spis: json['spis'] as Map, - snippets: json['snippets'] as Map, - keys: json['keys'] as Map, - container: json['container'] as Map, - history: json['history'] as Map, - settings: json['settings'] as Map, - ); +_BackupV2 _$BackupV2FromJson(Map json) => _BackupV2( + version: (json['version'] as num).toInt(), + date: (json['date'] as num).toInt(), + spis: json['spis'] as Map, + snippets: json['snippets'] as Map, + keys: json['keys'] as Map, + container: json['container'] as Map, + history: json['history'] as Map, + settings: json['settings'] as Map, +); -Map _$$BackupV2ImplToJson(_$BackupV2Impl instance) => - { - 'version': instance.version, - 'date': instance.date, - 'spis': instance.spis, - 'snippets': instance.snippets, - 'keys': instance.keys, - 'container': instance.container, - 'history': instance.history, - 'settings': instance.settings, - }; +Map _$BackupV2ToJson(_BackupV2 instance) => { + 'version': instance.version, + 'date': instance.date, + 'spis': instance.spis, + 'snippets': instance.snippets, + 'keys': instance.keys, + 'container': instance.container, + 'history': instance.history, + 'settings': instance.settings, +}; diff --git a/lib/data/model/server/disk_smart.dart b/lib/data/model/server/disk_smart.dart index fcfef991..d2cc065a 100644 --- a/lib/data/model/server/disk_smart.dart +++ b/lib/data/model/server/disk_smart.dart @@ -7,7 +7,7 @@ part 'disk_smart.freezed.dart'; part 'disk_smart.g.dart'; @freezed -class DiskSmart with _$DiskSmart { +abstract class DiskSmart with _$DiskSmart { const DiskSmart._(); const factory DiskSmart({ @@ -144,7 +144,7 @@ class DiskSmart with _$DiskSmart { } @freezed -class SmartAttribute with _$SmartAttribute { +abstract class SmartAttribute with _$SmartAttribute { const SmartAttribute._(); const factory SmartAttribute({ @@ -168,7 +168,7 @@ class SmartAttribute with _$SmartAttribute { } @freezed -class SmartAttributeFlags with _$SmartAttributeFlags { +abstract class SmartAttributeFlags with _$SmartAttributeFlags { const SmartAttributeFlags._(); const factory SmartAttributeFlags({ diff --git a/lib/data/model/server/disk_smart.freezed.dart b/lib/data/model/server/disk_smart.freezed.dart index 724a88b0..d661243e 100644 --- a/lib/data/model/server/disk_smart.freezed.dart +++ b/lib/data/model/server/disk_smart.freezed.dart @@ -1,3 +1,4 @@ +// dart format width=80 // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint @@ -9,1030 +10,480 @@ part of 'disk_smart.dart'; // FreezedGenerator // ************************************************************************** +// dart format off T _$identity(T value) => value; -final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models', -); - -DiskSmart _$DiskSmartFromJson(Map json) { - return _DiskSmart.fromJson(json); -} - /// @nodoc mixin _$DiskSmart { - String get device => throw _privateConstructorUsedError; - bool? get healthy => throw _privateConstructorUsedError; - double? get temperature => throw _privateConstructorUsedError; - String? get model => throw _privateConstructorUsedError; - String? get serial => throw _privateConstructorUsedError; - int? get powerOnHours => throw _privateConstructorUsedError; - int? get powerCycleCount => throw _privateConstructorUsedError; - Map get rawData => throw _privateConstructorUsedError; - Map get smartAttributes => - throw _privateConstructorUsedError; + + String get device; bool? get healthy; double? get temperature; String? get model; String? get serial; int? get powerOnHours; int? get powerCycleCount; Map get rawData; Map get smartAttributes; +/// Create a copy of DiskSmart +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$DiskSmartCopyWith get copyWith => _$DiskSmartCopyWithImpl(this as DiskSmart, _$identity); /// Serializes this DiskSmart to a JSON map. - Map toJson() => throw _privateConstructorUsedError; + Map toJson(); + + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is DiskSmart&&(identical(other.device, device) || other.device == device)&&(identical(other.healthy, healthy) || other.healthy == healthy)&&(identical(other.temperature, temperature) || other.temperature == temperature)&&(identical(other.model, model) || other.model == model)&&(identical(other.serial, serial) || other.serial == serial)&&(identical(other.powerOnHours, powerOnHours) || other.powerOnHours == powerOnHours)&&(identical(other.powerCycleCount, powerCycleCount) || other.powerCycleCount == powerCycleCount)&&const DeepCollectionEquality().equals(other.rawData, rawData)&&const DeepCollectionEquality().equals(other.smartAttributes, smartAttributes)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,device,healthy,temperature,model,serial,powerOnHours,powerCycleCount,const DeepCollectionEquality().hash(rawData),const DeepCollectionEquality().hash(smartAttributes)); + + - /// Create a copy of DiskSmart - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - $DiskSmartCopyWith get copyWith => - throw _privateConstructorUsedError; } /// @nodoc -abstract class $DiskSmartCopyWith<$Res> { - factory $DiskSmartCopyWith(DiskSmart value, $Res Function(DiskSmart) then) = - _$DiskSmartCopyWithImpl<$Res, DiskSmart>; - @useResult - $Res call({ - String device, - bool? healthy, - double? temperature, - String? model, - String? serial, - int? powerOnHours, - int? powerCycleCount, - Map rawData, - Map smartAttributes, - }); -} +abstract mixin class $DiskSmartCopyWith<$Res> { + factory $DiskSmartCopyWith(DiskSmart value, $Res Function(DiskSmart) _then) = _$DiskSmartCopyWithImpl; +@useResult +$Res call({ + String device, bool? healthy, double? temperature, String? model, String? serial, int? powerOnHours, int? powerCycleCount, Map rawData, Map smartAttributes +}); + + + +} /// @nodoc -class _$DiskSmartCopyWithImpl<$Res, $Val extends DiskSmart> +class _$DiskSmartCopyWithImpl<$Res> implements $DiskSmartCopyWith<$Res> { - _$DiskSmartCopyWithImpl(this._value, this._then); + _$DiskSmartCopyWithImpl(this._self, this._then); - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; + final DiskSmart _self; + final $Res Function(DiskSmart) _then; - /// Create a copy of DiskSmart - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? device = null, - Object? healthy = freezed, - Object? temperature = freezed, - Object? model = freezed, - Object? serial = freezed, - Object? powerOnHours = freezed, - Object? powerCycleCount = freezed, - Object? rawData = null, - Object? smartAttributes = null, - }) { - return _then( - _value.copyWith( - device: null == device - ? _value.device - : device // ignore: cast_nullable_to_non_nullable - as String, - healthy: freezed == healthy - ? _value.healthy - : healthy // ignore: cast_nullable_to_non_nullable - as bool?, - temperature: freezed == temperature - ? _value.temperature - : temperature // ignore: cast_nullable_to_non_nullable - as double?, - model: freezed == model - ? _value.model - : model // ignore: cast_nullable_to_non_nullable - as String?, - serial: freezed == serial - ? _value.serial - : serial // ignore: cast_nullable_to_non_nullable - as String?, - powerOnHours: freezed == powerOnHours - ? _value.powerOnHours - : powerOnHours // ignore: cast_nullable_to_non_nullable - as int?, - powerCycleCount: freezed == powerCycleCount - ? _value.powerCycleCount - : powerCycleCount // ignore: cast_nullable_to_non_nullable - as int?, - rawData: null == rawData - ? _value.rawData - : rawData // ignore: cast_nullable_to_non_nullable - as Map, - smartAttributes: null == smartAttributes - ? _value.smartAttributes - : smartAttributes // ignore: cast_nullable_to_non_nullable - as Map, - ) - as $Val, - ); - } +/// Create a copy of DiskSmart +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? device = null,Object? healthy = freezed,Object? temperature = freezed,Object? model = freezed,Object? serial = freezed,Object? powerOnHours = freezed,Object? powerCycleCount = freezed,Object? rawData = null,Object? smartAttributes = null,}) { + return _then(_self.copyWith( +device: null == device ? _self.device : device // ignore: cast_nullable_to_non_nullable +as String,healthy: freezed == healthy ? _self.healthy : healthy // ignore: cast_nullable_to_non_nullable +as bool?,temperature: freezed == temperature ? _self.temperature : temperature // ignore: cast_nullable_to_non_nullable +as double?,model: freezed == model ? _self.model : model // ignore: cast_nullable_to_non_nullable +as String?,serial: freezed == serial ? _self.serial : serial // ignore: cast_nullable_to_non_nullable +as String?,powerOnHours: freezed == powerOnHours ? _self.powerOnHours : powerOnHours // ignore: cast_nullable_to_non_nullable +as int?,powerCycleCount: freezed == powerCycleCount ? _self.powerCycleCount : powerCycleCount // ignore: cast_nullable_to_non_nullable +as int?,rawData: null == rawData ? _self.rawData : rawData // ignore: cast_nullable_to_non_nullable +as Map,smartAttributes: null == smartAttributes ? _self.smartAttributes : smartAttributes // ignore: cast_nullable_to_non_nullable +as Map, + )); } -/// @nodoc -abstract class _$$DiskSmartImplCopyWith<$Res> - implements $DiskSmartCopyWith<$Res> { - factory _$$DiskSmartImplCopyWith( - _$DiskSmartImpl value, - $Res Function(_$DiskSmartImpl) then, - ) = __$$DiskSmartImplCopyWithImpl<$Res>; - @override - @useResult - $Res call({ - String device, - bool? healthy, - double? temperature, - String? model, - String? serial, - int? powerOnHours, - int? powerCycleCount, - Map rawData, - Map smartAttributes, - }); } -/// @nodoc -class __$$DiskSmartImplCopyWithImpl<$Res> - extends _$DiskSmartCopyWithImpl<$Res, _$DiskSmartImpl> - implements _$$DiskSmartImplCopyWith<$Res> { - __$$DiskSmartImplCopyWithImpl( - _$DiskSmartImpl _value, - $Res Function(_$DiskSmartImpl) _then, - ) : super(_value, _then); - - /// Create a copy of DiskSmart - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? device = null, - Object? healthy = freezed, - Object? temperature = freezed, - Object? model = freezed, - Object? serial = freezed, - Object? powerOnHours = freezed, - Object? powerCycleCount = freezed, - Object? rawData = null, - Object? smartAttributes = null, - }) { - return _then( - _$DiskSmartImpl( - device: null == device - ? _value.device - : device // ignore: cast_nullable_to_non_nullable - as String, - healthy: freezed == healthy - ? _value.healthy - : healthy // ignore: cast_nullable_to_non_nullable - as bool?, - temperature: freezed == temperature - ? _value.temperature - : temperature // ignore: cast_nullable_to_non_nullable - as double?, - model: freezed == model - ? _value.model - : model // ignore: cast_nullable_to_non_nullable - as String?, - serial: freezed == serial - ? _value.serial - : serial // ignore: cast_nullable_to_non_nullable - as String?, - powerOnHours: freezed == powerOnHours - ? _value.powerOnHours - : powerOnHours // ignore: cast_nullable_to_non_nullable - as int?, - powerCycleCount: freezed == powerCycleCount - ? _value.powerCycleCount - : powerCycleCount // ignore: cast_nullable_to_non_nullable - as int?, - rawData: null == rawData - ? _value._rawData - : rawData // ignore: cast_nullable_to_non_nullable - as Map, - smartAttributes: null == smartAttributes - ? _value._smartAttributes - : smartAttributes // ignore: cast_nullable_to_non_nullable - as Map, - ), - ); - } -} /// @nodoc @JsonSerializable() -class _$DiskSmartImpl extends _DiskSmart { - const _$DiskSmartImpl({ - required this.device, - this.healthy, - this.temperature, - this.model, - this.serial, - this.powerOnHours, - this.powerCycleCount, - required final Map rawData, - required final Map smartAttributes, - }) : _rawData = rawData, - _smartAttributes = smartAttributes, - super._(); - factory _$DiskSmartImpl.fromJson(Map json) => - _$$DiskSmartImplFromJson(json); +class _DiskSmart extends DiskSmart { + const _DiskSmart({required this.device, this.healthy, this.temperature, this.model, this.serial, this.powerOnHours, this.powerCycleCount, required final Map rawData, required final Map smartAttributes}): _rawData = rawData,_smartAttributes = smartAttributes,super._(); + factory _DiskSmart.fromJson(Map json) => _$DiskSmartFromJson(json); - @override - final String device; - @override - final bool? healthy; - @override - final double? temperature; - @override - final String? model; - @override - final String? serial; - @override - final int? powerOnHours; - @override - final int? powerCycleCount; - final Map _rawData; - @override - Map get rawData { - if (_rawData is EqualUnmodifiableMapView) return _rawData; - // ignore: implicit_dynamic_type - return EqualUnmodifiableMapView(_rawData); - } - - final Map _smartAttributes; - @override - Map get smartAttributes { - if (_smartAttributes is EqualUnmodifiableMapView) return _smartAttributes; - // ignore: implicit_dynamic_type - return EqualUnmodifiableMapView(_smartAttributes); - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$DiskSmartImpl && - (identical(other.device, device) || other.device == device) && - (identical(other.healthy, healthy) || other.healthy == healthy) && - (identical(other.temperature, temperature) || - other.temperature == temperature) && - (identical(other.model, model) || other.model == model) && - (identical(other.serial, serial) || other.serial == serial) && - (identical(other.powerOnHours, powerOnHours) || - other.powerOnHours == powerOnHours) && - (identical(other.powerCycleCount, powerCycleCount) || - other.powerCycleCount == powerCycleCount) && - const DeepCollectionEquality().equals(other._rawData, _rawData) && - const DeepCollectionEquality().equals( - other._smartAttributes, - _smartAttributes, - )); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash( - runtimeType, - device, - healthy, - temperature, - model, - serial, - powerOnHours, - powerCycleCount, - const DeepCollectionEquality().hash(_rawData), - const DeepCollectionEquality().hash(_smartAttributes), - ); - - /// Create a copy of DiskSmart - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @override - @pragma('vm:prefer-inline') - _$$DiskSmartImplCopyWith<_$DiskSmartImpl> get copyWith => - __$$DiskSmartImplCopyWithImpl<_$DiskSmartImpl>(this, _$identity); - - @override - Map toJson() { - return _$$DiskSmartImplToJson(this); - } +@override final String device; +@override final bool? healthy; +@override final double? temperature; +@override final String? model; +@override final String? serial; +@override final int? powerOnHours; +@override final int? powerCycleCount; + final Map _rawData; +@override Map get rawData { + if (_rawData is EqualUnmodifiableMapView) return _rawData; + // ignore: implicit_dynamic_type + return EqualUnmodifiableMapView(_rawData); } -abstract class _DiskSmart extends DiskSmart { - const factory _DiskSmart({ - required final String device, - final bool? healthy, - final double? temperature, - final String? model, - final String? serial, - final int? powerOnHours, - final int? powerCycleCount, - required final Map rawData, - required final Map smartAttributes, - }) = _$DiskSmartImpl; - const _DiskSmart._() : super._(); - - factory _DiskSmart.fromJson(Map json) = - _$DiskSmartImpl.fromJson; - - @override - String get device; - @override - bool? get healthy; - @override - double? get temperature; - @override - String? get model; - @override - String? get serial; - @override - int? get powerOnHours; - @override - int? get powerCycleCount; - @override - Map get rawData; - @override - Map get smartAttributes; - - /// Create a copy of DiskSmart - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$DiskSmartImplCopyWith<_$DiskSmartImpl> get copyWith => - throw _privateConstructorUsedError; + final Map _smartAttributes; +@override Map get smartAttributes { + if (_smartAttributes is EqualUnmodifiableMapView) return _smartAttributes; + // ignore: implicit_dynamic_type + return EqualUnmodifiableMapView(_smartAttributes); } -SmartAttribute _$SmartAttributeFromJson(Map json) { - return _SmartAttribute.fromJson(json); + +/// Create a copy of DiskSmart +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$DiskSmartCopyWith<_DiskSmart> get copyWith => __$DiskSmartCopyWithImpl<_DiskSmart>(this, _$identity); + +@override +Map toJson() { + return _$DiskSmartToJson(this, ); } +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _DiskSmart&&(identical(other.device, device) || other.device == device)&&(identical(other.healthy, healthy) || other.healthy == healthy)&&(identical(other.temperature, temperature) || other.temperature == temperature)&&(identical(other.model, model) || other.model == model)&&(identical(other.serial, serial) || other.serial == serial)&&(identical(other.powerOnHours, powerOnHours) || other.powerOnHours == powerOnHours)&&(identical(other.powerCycleCount, powerCycleCount) || other.powerCycleCount == powerCycleCount)&&const DeepCollectionEquality().equals(other._rawData, _rawData)&&const DeepCollectionEquality().equals(other._smartAttributes, _smartAttributes)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,device,healthy,temperature,model,serial,powerOnHours,powerCycleCount,const DeepCollectionEquality().hash(_rawData),const DeepCollectionEquality().hash(_smartAttributes)); + + + +} + +/// @nodoc +abstract mixin class _$DiskSmartCopyWith<$Res> implements $DiskSmartCopyWith<$Res> { + factory _$DiskSmartCopyWith(_DiskSmart value, $Res Function(_DiskSmart) _then) = __$DiskSmartCopyWithImpl; +@override @useResult +$Res call({ + String device, bool? healthy, double? temperature, String? model, String? serial, int? powerOnHours, int? powerCycleCount, Map rawData, Map smartAttributes +}); + + + + +} +/// @nodoc +class __$DiskSmartCopyWithImpl<$Res> + implements _$DiskSmartCopyWith<$Res> { + __$DiskSmartCopyWithImpl(this._self, this._then); + + final _DiskSmart _self; + final $Res Function(_DiskSmart) _then; + +/// Create a copy of DiskSmart +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? device = null,Object? healthy = freezed,Object? temperature = freezed,Object? model = freezed,Object? serial = freezed,Object? powerOnHours = freezed,Object? powerCycleCount = freezed,Object? rawData = null,Object? smartAttributes = null,}) { + return _then(_DiskSmart( +device: null == device ? _self.device : device // ignore: cast_nullable_to_non_nullable +as String,healthy: freezed == healthy ? _self.healthy : healthy // ignore: cast_nullable_to_non_nullable +as bool?,temperature: freezed == temperature ? _self.temperature : temperature // ignore: cast_nullable_to_non_nullable +as double?,model: freezed == model ? _self.model : model // ignore: cast_nullable_to_non_nullable +as String?,serial: freezed == serial ? _self.serial : serial // ignore: cast_nullable_to_non_nullable +as String?,powerOnHours: freezed == powerOnHours ? _self.powerOnHours : powerOnHours // ignore: cast_nullable_to_non_nullable +as int?,powerCycleCount: freezed == powerCycleCount ? _self.powerCycleCount : powerCycleCount // ignore: cast_nullable_to_non_nullable +as int?,rawData: null == rawData ? _self._rawData : rawData // ignore: cast_nullable_to_non_nullable +as Map,smartAttributes: null == smartAttributes ? _self._smartAttributes : smartAttributes // ignore: cast_nullable_to_non_nullable +as Map, + )); +} + + +} + + /// @nodoc mixin _$SmartAttribute { - int? get id => throw _privateConstructorUsedError; - String get name => throw _privateConstructorUsedError; - int? get value => throw _privateConstructorUsedError; - int? get worst => throw _privateConstructorUsedError; - int? get thresh => throw _privateConstructorUsedError; - String? get whenFailed => throw _privateConstructorUsedError; - dynamic get rawValue => throw _privateConstructorUsedError; - String? get rawString => throw _privateConstructorUsedError; - SmartAttributeFlags get flags => throw _privateConstructorUsedError; + + int? get id; String get name; int? get value; int? get worst; int? get thresh; String? get whenFailed; dynamic get rawValue; String? get rawString; SmartAttributeFlags get flags; +/// Create a copy of SmartAttribute +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$SmartAttributeCopyWith get copyWith => _$SmartAttributeCopyWithImpl(this as SmartAttribute, _$identity); /// Serializes this SmartAttribute to a JSON map. - Map toJson() => throw _privateConstructorUsedError; + Map toJson(); + + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is SmartAttribute&&(identical(other.id, id) || other.id == id)&&(identical(other.name, name) || other.name == name)&&(identical(other.value, value) || other.value == value)&&(identical(other.worst, worst) || other.worst == worst)&&(identical(other.thresh, thresh) || other.thresh == thresh)&&(identical(other.whenFailed, whenFailed) || other.whenFailed == whenFailed)&&const DeepCollectionEquality().equals(other.rawValue, rawValue)&&(identical(other.rawString, rawString) || other.rawString == rawString)&&(identical(other.flags, flags) || other.flags == flags)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,id,name,value,worst,thresh,whenFailed,const DeepCollectionEquality().hash(rawValue),rawString,flags); + + - /// Create a copy of SmartAttribute - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - $SmartAttributeCopyWith get copyWith => - throw _privateConstructorUsedError; } /// @nodoc -abstract class $SmartAttributeCopyWith<$Res> { - factory $SmartAttributeCopyWith( - SmartAttribute value, - $Res Function(SmartAttribute) then, - ) = _$SmartAttributeCopyWithImpl<$Res, SmartAttribute>; - @useResult - $Res call({ - int? id, - String name, - int? value, - int? worst, - int? thresh, - String? whenFailed, - dynamic rawValue, - String? rawString, - SmartAttributeFlags flags, - }); +abstract mixin class $SmartAttributeCopyWith<$Res> { + factory $SmartAttributeCopyWith(SmartAttribute value, $Res Function(SmartAttribute) _then) = _$SmartAttributeCopyWithImpl; +@useResult +$Res call({ + int? id, String name, int? value, int? worst, int? thresh, String? whenFailed, dynamic rawValue, String? rawString, SmartAttributeFlags flags +}); + + +$SmartAttributeFlagsCopyWith<$Res> get flags; - $SmartAttributeFlagsCopyWith<$Res> get flags; } - /// @nodoc -class _$SmartAttributeCopyWithImpl<$Res, $Val extends SmartAttribute> +class _$SmartAttributeCopyWithImpl<$Res> implements $SmartAttributeCopyWith<$Res> { - _$SmartAttributeCopyWithImpl(this._value, this._then); + _$SmartAttributeCopyWithImpl(this._self, this._then); - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; + final SmartAttribute _self; + final $Res Function(SmartAttribute) _then; - /// Create a copy of SmartAttribute - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? id = freezed, - Object? name = null, - Object? value = freezed, - Object? worst = freezed, - Object? thresh = freezed, - Object? whenFailed = freezed, - Object? rawValue = freezed, - Object? rawString = freezed, - Object? flags = null, - }) { - return _then( - _value.copyWith( - id: freezed == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int?, - name: null == name - ? _value.name - : name // ignore: cast_nullable_to_non_nullable - as String, - value: freezed == value - ? _value.value - : value // ignore: cast_nullable_to_non_nullable - as int?, - worst: freezed == worst - ? _value.worst - : worst // ignore: cast_nullable_to_non_nullable - as int?, - thresh: freezed == thresh - ? _value.thresh - : thresh // ignore: cast_nullable_to_non_nullable - as int?, - whenFailed: freezed == whenFailed - ? _value.whenFailed - : whenFailed // ignore: cast_nullable_to_non_nullable - as String?, - rawValue: freezed == rawValue - ? _value.rawValue - : rawValue // ignore: cast_nullable_to_non_nullable - as dynamic, - rawString: freezed == rawString - ? _value.rawString - : rawString // ignore: cast_nullable_to_non_nullable - as String?, - flags: null == flags - ? _value.flags - : flags // ignore: cast_nullable_to_non_nullable - as SmartAttributeFlags, - ) - as $Val, - ); - } - - /// Create a copy of SmartAttribute - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $SmartAttributeFlagsCopyWith<$Res> get flags { - return $SmartAttributeFlagsCopyWith<$Res>(_value.flags, (value) { - return _then(_value.copyWith(flags: value) as $Val); - }); - } +/// Create a copy of SmartAttribute +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? id = freezed,Object? name = null,Object? value = freezed,Object? worst = freezed,Object? thresh = freezed,Object? whenFailed = freezed,Object? rawValue = freezed,Object? rawString = freezed,Object? flags = null,}) { + return _then(_self.copyWith( +id: freezed == id ? _self.id : id // ignore: cast_nullable_to_non_nullable +as int?,name: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable +as String,value: freezed == value ? _self.value : value // ignore: cast_nullable_to_non_nullable +as int?,worst: freezed == worst ? _self.worst : worst // ignore: cast_nullable_to_non_nullable +as int?,thresh: freezed == thresh ? _self.thresh : thresh // ignore: cast_nullable_to_non_nullable +as int?,whenFailed: freezed == whenFailed ? _self.whenFailed : whenFailed // ignore: cast_nullable_to_non_nullable +as String?,rawValue: freezed == rawValue ? _self.rawValue : rawValue // ignore: cast_nullable_to_non_nullable +as dynamic,rawString: freezed == rawString ? _self.rawString : rawString // ignore: cast_nullable_to_non_nullable +as String?,flags: null == flags ? _self.flags : flags // ignore: cast_nullable_to_non_nullable +as SmartAttributeFlags, + )); } - -/// @nodoc -abstract class _$$SmartAttributeImplCopyWith<$Res> - implements $SmartAttributeCopyWith<$Res> { - factory _$$SmartAttributeImplCopyWith( - _$SmartAttributeImpl value, - $Res Function(_$SmartAttributeImpl) then, - ) = __$$SmartAttributeImplCopyWithImpl<$Res>; - @override - @useResult - $Res call({ - int? id, - String name, - int? value, - int? worst, - int? thresh, - String? whenFailed, - dynamic rawValue, - String? rawString, - SmartAttributeFlags flags, +/// Create a copy of SmartAttribute +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$SmartAttributeFlagsCopyWith<$Res> get flags { + + return $SmartAttributeFlagsCopyWith<$Res>(_self.flags, (value) { + return _then(_self.copyWith(flags: value)); }); - - @override - $SmartAttributeFlagsCopyWith<$Res> get flags; +} } -/// @nodoc -class __$$SmartAttributeImplCopyWithImpl<$Res> - extends _$SmartAttributeCopyWithImpl<$Res, _$SmartAttributeImpl> - implements _$$SmartAttributeImplCopyWith<$Res> { - __$$SmartAttributeImplCopyWithImpl( - _$SmartAttributeImpl _value, - $Res Function(_$SmartAttributeImpl) _then, - ) : super(_value, _then); - - /// Create a copy of SmartAttribute - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? id = freezed, - Object? name = null, - Object? value = freezed, - Object? worst = freezed, - Object? thresh = freezed, - Object? whenFailed = freezed, - Object? rawValue = freezed, - Object? rawString = freezed, - Object? flags = null, - }) { - return _then( - _$SmartAttributeImpl( - id: freezed == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int?, - name: null == name - ? _value.name - : name // ignore: cast_nullable_to_non_nullable - as String, - value: freezed == value - ? _value.value - : value // ignore: cast_nullable_to_non_nullable - as int?, - worst: freezed == worst - ? _value.worst - : worst // ignore: cast_nullable_to_non_nullable - as int?, - thresh: freezed == thresh - ? _value.thresh - : thresh // ignore: cast_nullable_to_non_nullable - as int?, - whenFailed: freezed == whenFailed - ? _value.whenFailed - : whenFailed // ignore: cast_nullable_to_non_nullable - as String?, - rawValue: freezed == rawValue - ? _value.rawValue - : rawValue // ignore: cast_nullable_to_non_nullable - as dynamic, - rawString: freezed == rawString - ? _value.rawString - : rawString // ignore: cast_nullable_to_non_nullable - as String?, - flags: null == flags - ? _value.flags - : flags // ignore: cast_nullable_to_non_nullable - as SmartAttributeFlags, - ), - ); - } -} /// @nodoc @JsonSerializable() -class _$SmartAttributeImpl extends _SmartAttribute { - const _$SmartAttributeImpl({ - this.id, - required this.name, - this.value, - this.worst, - this.thresh, - this.whenFailed, - this.rawValue, - this.rawString, - required this.flags, - }) : super._(); - factory _$SmartAttributeImpl.fromJson(Map json) => - _$$SmartAttributeImplFromJson(json); +class _SmartAttribute extends SmartAttribute { + const _SmartAttribute({this.id, required this.name, this.value, this.worst, this.thresh, this.whenFailed, this.rawValue, this.rawString, required this.flags}): super._(); + factory _SmartAttribute.fromJson(Map json) => _$SmartAttributeFromJson(json); - @override - final int? id; - @override - final String name; - @override - final int? value; - @override - final int? worst; - @override - final int? thresh; - @override - final String? whenFailed; - @override - final dynamic rawValue; - @override - final String? rawString; - @override - final SmartAttributeFlags flags; +@override final int? id; +@override final String name; +@override final int? value; +@override final int? worst; +@override final int? thresh; +@override final String? whenFailed; +@override final dynamic rawValue; +@override final String? rawString; +@override final SmartAttributeFlags flags; - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$SmartAttributeImpl && - (identical(other.id, id) || other.id == id) && - (identical(other.name, name) || other.name == name) && - (identical(other.value, value) || other.value == value) && - (identical(other.worst, worst) || other.worst == worst) && - (identical(other.thresh, thresh) || other.thresh == thresh) && - (identical(other.whenFailed, whenFailed) || - other.whenFailed == whenFailed) && - const DeepCollectionEquality().equals(other.rawValue, rawValue) && - (identical(other.rawString, rawString) || - other.rawString == rawString) && - (identical(other.flags, flags) || other.flags == flags)); - } +/// Create a copy of SmartAttribute +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$SmartAttributeCopyWith<_SmartAttribute> get copyWith => __$SmartAttributeCopyWithImpl<_SmartAttribute>(this, _$identity); - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash( - runtimeType, - id, - name, - value, - worst, - thresh, - whenFailed, - const DeepCollectionEquality().hash(rawValue), - rawString, - flags, - ); - - /// Create a copy of SmartAttribute - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @override - @pragma('vm:prefer-inline') - _$$SmartAttributeImplCopyWith<_$SmartAttributeImpl> get copyWith => - __$$SmartAttributeImplCopyWithImpl<_$SmartAttributeImpl>( - this, - _$identity, - ); - - @override - Map toJson() { - return _$$SmartAttributeImplToJson(this); - } +@override +Map toJson() { + return _$SmartAttributeToJson(this, ); } -abstract class _SmartAttribute extends SmartAttribute { - const factory _SmartAttribute({ - final int? id, - required final String name, - final int? value, - final int? worst, - final int? thresh, - final String? whenFailed, - final dynamic rawValue, - final String? rawString, - required final SmartAttributeFlags flags, - }) = _$SmartAttributeImpl; - const _SmartAttribute._() : super._(); - - factory _SmartAttribute.fromJson(Map json) = - _$SmartAttributeImpl.fromJson; - - @override - int? get id; - @override - String get name; - @override - int? get value; - @override - int? get worst; - @override - int? get thresh; - @override - String? get whenFailed; - @override - dynamic get rawValue; - @override - String? get rawString; - @override - SmartAttributeFlags get flags; - - /// Create a copy of SmartAttribute - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$SmartAttributeImplCopyWith<_$SmartAttributeImpl> get copyWith => - throw _privateConstructorUsedError; +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _SmartAttribute&&(identical(other.id, id) || other.id == id)&&(identical(other.name, name) || other.name == name)&&(identical(other.value, value) || other.value == value)&&(identical(other.worst, worst) || other.worst == worst)&&(identical(other.thresh, thresh) || other.thresh == thresh)&&(identical(other.whenFailed, whenFailed) || other.whenFailed == whenFailed)&&const DeepCollectionEquality().equals(other.rawValue, rawValue)&&(identical(other.rawString, rawString) || other.rawString == rawString)&&(identical(other.flags, flags) || other.flags == flags)); } -SmartAttributeFlags _$SmartAttributeFlagsFromJson(Map json) { - return _SmartAttributeFlags.fromJson(json); +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,id,name,value,worst,thresh,whenFailed,const DeepCollectionEquality().hash(rawValue),rawString,flags); + + + } +/// @nodoc +abstract mixin class _$SmartAttributeCopyWith<$Res> implements $SmartAttributeCopyWith<$Res> { + factory _$SmartAttributeCopyWith(_SmartAttribute value, $Res Function(_SmartAttribute) _then) = __$SmartAttributeCopyWithImpl; +@override @useResult +$Res call({ + int? id, String name, int? value, int? worst, int? thresh, String? whenFailed, dynamic rawValue, String? rawString, SmartAttributeFlags flags +}); + + +@override $SmartAttributeFlagsCopyWith<$Res> get flags; + +} +/// @nodoc +class __$SmartAttributeCopyWithImpl<$Res> + implements _$SmartAttributeCopyWith<$Res> { + __$SmartAttributeCopyWithImpl(this._self, this._then); + + final _SmartAttribute _self; + final $Res Function(_SmartAttribute) _then; + +/// Create a copy of SmartAttribute +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? id = freezed,Object? name = null,Object? value = freezed,Object? worst = freezed,Object? thresh = freezed,Object? whenFailed = freezed,Object? rawValue = freezed,Object? rawString = freezed,Object? flags = null,}) { + return _then(_SmartAttribute( +id: freezed == id ? _self.id : id // ignore: cast_nullable_to_non_nullable +as int?,name: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable +as String,value: freezed == value ? _self.value : value // ignore: cast_nullable_to_non_nullable +as int?,worst: freezed == worst ? _self.worst : worst // ignore: cast_nullable_to_non_nullable +as int?,thresh: freezed == thresh ? _self.thresh : thresh // ignore: cast_nullable_to_non_nullable +as int?,whenFailed: freezed == whenFailed ? _self.whenFailed : whenFailed // ignore: cast_nullable_to_non_nullable +as String?,rawValue: freezed == rawValue ? _self.rawValue : rawValue // ignore: cast_nullable_to_non_nullable +as dynamic,rawString: freezed == rawString ? _self.rawString : rawString // ignore: cast_nullable_to_non_nullable +as String?,flags: null == flags ? _self.flags : flags // ignore: cast_nullable_to_non_nullable +as SmartAttributeFlags, + )); +} + +/// Create a copy of SmartAttribute +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$SmartAttributeFlagsCopyWith<$Res> get flags { + + return $SmartAttributeFlagsCopyWith<$Res>(_self.flags, (value) { + return _then(_self.copyWith(flags: value)); + }); +} +} + + /// @nodoc mixin _$SmartAttributeFlags { - int? get value => throw _privateConstructorUsedError; - String? get string => throw _privateConstructorUsedError; - bool get prefailure => throw _privateConstructorUsedError; - bool get updatedOnline => throw _privateConstructorUsedError; - bool get performance => throw _privateConstructorUsedError; - bool get errorRate => throw _privateConstructorUsedError; - bool get eventCount => throw _privateConstructorUsedError; - bool get autoKeep => throw _privateConstructorUsedError; + + int? get value; String? get string; bool get prefailure; bool get updatedOnline; bool get performance; bool get errorRate; bool get eventCount; bool get autoKeep; +/// Create a copy of SmartAttributeFlags +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$SmartAttributeFlagsCopyWith get copyWith => _$SmartAttributeFlagsCopyWithImpl(this as SmartAttributeFlags, _$identity); /// Serializes this SmartAttributeFlags to a JSON map. - Map toJson() => throw _privateConstructorUsedError; + Map toJson(); + + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is SmartAttributeFlags&&(identical(other.value, value) || other.value == value)&&(identical(other.string, string) || other.string == string)&&(identical(other.prefailure, prefailure) || other.prefailure == prefailure)&&(identical(other.updatedOnline, updatedOnline) || other.updatedOnline == updatedOnline)&&(identical(other.performance, performance) || other.performance == performance)&&(identical(other.errorRate, errorRate) || other.errorRate == errorRate)&&(identical(other.eventCount, eventCount) || other.eventCount == eventCount)&&(identical(other.autoKeep, autoKeep) || other.autoKeep == autoKeep)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,value,string,prefailure,updatedOnline,performance,errorRate,eventCount,autoKeep); + + - /// Create a copy of SmartAttributeFlags - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - $SmartAttributeFlagsCopyWith get copyWith => - throw _privateConstructorUsedError; } /// @nodoc -abstract class $SmartAttributeFlagsCopyWith<$Res> { - factory $SmartAttributeFlagsCopyWith( - SmartAttributeFlags value, - $Res Function(SmartAttributeFlags) then, - ) = _$SmartAttributeFlagsCopyWithImpl<$Res, SmartAttributeFlags>; - @useResult - $Res call({ - int? value, - String? string, - bool prefailure, - bool updatedOnline, - bool performance, - bool errorRate, - bool eventCount, - bool autoKeep, - }); -} +abstract mixin class $SmartAttributeFlagsCopyWith<$Res> { + factory $SmartAttributeFlagsCopyWith(SmartAttributeFlags value, $Res Function(SmartAttributeFlags) _then) = _$SmartAttributeFlagsCopyWithImpl; +@useResult +$Res call({ + int? value, String? string, bool prefailure, bool updatedOnline, bool performance, bool errorRate, bool eventCount, bool autoKeep +}); + + + +} /// @nodoc -class _$SmartAttributeFlagsCopyWithImpl<$Res, $Val extends SmartAttributeFlags> +class _$SmartAttributeFlagsCopyWithImpl<$Res> implements $SmartAttributeFlagsCopyWith<$Res> { - _$SmartAttributeFlagsCopyWithImpl(this._value, this._then); + _$SmartAttributeFlagsCopyWithImpl(this._self, this._then); - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; + final SmartAttributeFlags _self; + final $Res Function(SmartAttributeFlags) _then; - /// Create a copy of SmartAttributeFlags - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? value = freezed, - Object? string = freezed, - Object? prefailure = null, - Object? updatedOnline = null, - Object? performance = null, - Object? errorRate = null, - Object? eventCount = null, - Object? autoKeep = null, - }) { - return _then( - _value.copyWith( - value: freezed == value - ? _value.value - : value // ignore: cast_nullable_to_non_nullable - as int?, - string: freezed == string - ? _value.string - : string // ignore: cast_nullable_to_non_nullable - as String?, - prefailure: null == prefailure - ? _value.prefailure - : prefailure // ignore: cast_nullable_to_non_nullable - as bool, - updatedOnline: null == updatedOnline - ? _value.updatedOnline - : updatedOnline // ignore: cast_nullable_to_non_nullable - as bool, - performance: null == performance - ? _value.performance - : performance // ignore: cast_nullable_to_non_nullable - as bool, - errorRate: null == errorRate - ? _value.errorRate - : errorRate // ignore: cast_nullable_to_non_nullable - as bool, - eventCount: null == eventCount - ? _value.eventCount - : eventCount // ignore: cast_nullable_to_non_nullable - as bool, - autoKeep: null == autoKeep - ? _value.autoKeep - : autoKeep // ignore: cast_nullable_to_non_nullable - as bool, - ) - as $Val, - ); - } +/// Create a copy of SmartAttributeFlags +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? value = freezed,Object? string = freezed,Object? prefailure = null,Object? updatedOnline = null,Object? performance = null,Object? errorRate = null,Object? eventCount = null,Object? autoKeep = null,}) { + return _then(_self.copyWith( +value: freezed == value ? _self.value : value // ignore: cast_nullable_to_non_nullable +as int?,string: freezed == string ? _self.string : string // ignore: cast_nullable_to_non_nullable +as String?,prefailure: null == prefailure ? _self.prefailure : prefailure // ignore: cast_nullable_to_non_nullable +as bool,updatedOnline: null == updatedOnline ? _self.updatedOnline : updatedOnline // ignore: cast_nullable_to_non_nullable +as bool,performance: null == performance ? _self.performance : performance // ignore: cast_nullable_to_non_nullable +as bool,errorRate: null == errorRate ? _self.errorRate : errorRate // ignore: cast_nullable_to_non_nullable +as bool,eventCount: null == eventCount ? _self.eventCount : eventCount // ignore: cast_nullable_to_non_nullable +as bool,autoKeep: null == autoKeep ? _self.autoKeep : autoKeep // ignore: cast_nullable_to_non_nullable +as bool, + )); } -/// @nodoc -abstract class _$$SmartAttributeFlagsImplCopyWith<$Res> - implements $SmartAttributeFlagsCopyWith<$Res> { - factory _$$SmartAttributeFlagsImplCopyWith( - _$SmartAttributeFlagsImpl value, - $Res Function(_$SmartAttributeFlagsImpl) then, - ) = __$$SmartAttributeFlagsImplCopyWithImpl<$Res>; - @override - @useResult - $Res call({ - int? value, - String? string, - bool prefailure, - bool updatedOnline, - bool performance, - bool errorRate, - bool eventCount, - bool autoKeep, - }); } -/// @nodoc -class __$$SmartAttributeFlagsImplCopyWithImpl<$Res> - extends _$SmartAttributeFlagsCopyWithImpl<$Res, _$SmartAttributeFlagsImpl> - implements _$$SmartAttributeFlagsImplCopyWith<$Res> { - __$$SmartAttributeFlagsImplCopyWithImpl( - _$SmartAttributeFlagsImpl _value, - $Res Function(_$SmartAttributeFlagsImpl) _then, - ) : super(_value, _then); - - /// Create a copy of SmartAttributeFlags - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? value = freezed, - Object? string = freezed, - Object? prefailure = null, - Object? updatedOnline = null, - Object? performance = null, - Object? errorRate = null, - Object? eventCount = null, - Object? autoKeep = null, - }) { - return _then( - _$SmartAttributeFlagsImpl( - value: freezed == value - ? _value.value - : value // ignore: cast_nullable_to_non_nullable - as int?, - string: freezed == string - ? _value.string - : string // ignore: cast_nullable_to_non_nullable - as String?, - prefailure: null == prefailure - ? _value.prefailure - : prefailure // ignore: cast_nullable_to_non_nullable - as bool, - updatedOnline: null == updatedOnline - ? _value.updatedOnline - : updatedOnline // ignore: cast_nullable_to_non_nullable - as bool, - performance: null == performance - ? _value.performance - : performance // ignore: cast_nullable_to_non_nullable - as bool, - errorRate: null == errorRate - ? _value.errorRate - : errorRate // ignore: cast_nullable_to_non_nullable - as bool, - eventCount: null == eventCount - ? _value.eventCount - : eventCount // ignore: cast_nullable_to_non_nullable - as bool, - autoKeep: null == autoKeep - ? _value.autoKeep - : autoKeep // ignore: cast_nullable_to_non_nullable - as bool, - ), - ); - } -} /// @nodoc @JsonSerializable() -class _$SmartAttributeFlagsImpl extends _SmartAttributeFlags { - const _$SmartAttributeFlagsImpl({ - this.value, - this.string, - this.prefailure = false, - this.updatedOnline = false, - this.performance = false, - this.errorRate = false, - this.eventCount = false, - this.autoKeep = false, - }) : super._(); - factory _$SmartAttributeFlagsImpl.fromJson(Map json) => - _$$SmartAttributeFlagsImplFromJson(json); +class _SmartAttributeFlags extends SmartAttributeFlags { + const _SmartAttributeFlags({this.value, this.string, this.prefailure = false, this.updatedOnline = false, this.performance = false, this.errorRate = false, this.eventCount = false, this.autoKeep = false}): super._(); + factory _SmartAttributeFlags.fromJson(Map json) => _$SmartAttributeFlagsFromJson(json); - @override - final int? value; - @override - final String? string; - @override - @JsonKey() - final bool prefailure; - @override - @JsonKey() - final bool updatedOnline; - @override - @JsonKey() - final bool performance; - @override - @JsonKey() - final bool errorRate; - @override - @JsonKey() - final bool eventCount; - @override - @JsonKey() - final bool autoKeep; +@override final int? value; +@override final String? string; +@override@JsonKey() final bool prefailure; +@override@JsonKey() final bool updatedOnline; +@override@JsonKey() final bool performance; +@override@JsonKey() final bool errorRate; +@override@JsonKey() final bool eventCount; +@override@JsonKey() final bool autoKeep; - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$SmartAttributeFlagsImpl && - (identical(other.value, value) || other.value == value) && - (identical(other.string, string) || other.string == string) && - (identical(other.prefailure, prefailure) || - other.prefailure == prefailure) && - (identical(other.updatedOnline, updatedOnline) || - other.updatedOnline == updatedOnline) && - (identical(other.performance, performance) || - other.performance == performance) && - (identical(other.errorRate, errorRate) || - other.errorRate == errorRate) && - (identical(other.eventCount, eventCount) || - other.eventCount == eventCount) && - (identical(other.autoKeep, autoKeep) || - other.autoKeep == autoKeep)); - } +/// Create a copy of SmartAttributeFlags +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$SmartAttributeFlagsCopyWith<_SmartAttributeFlags> get copyWith => __$SmartAttributeFlagsCopyWithImpl<_SmartAttributeFlags>(this, _$identity); - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash( - runtimeType, - value, - string, - prefailure, - updatedOnline, - performance, - errorRate, - eventCount, - autoKeep, - ); - - /// Create a copy of SmartAttributeFlags - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @override - @pragma('vm:prefer-inline') - _$$SmartAttributeFlagsImplCopyWith<_$SmartAttributeFlagsImpl> get copyWith => - __$$SmartAttributeFlagsImplCopyWithImpl<_$SmartAttributeFlagsImpl>( - this, - _$identity, - ); - - @override - Map toJson() { - return _$$SmartAttributeFlagsImplToJson(this); - } +@override +Map toJson() { + return _$SmartAttributeFlagsToJson(this, ); } -abstract class _SmartAttributeFlags extends SmartAttributeFlags { - const factory _SmartAttributeFlags({ - final int? value, - final String? string, - final bool prefailure, - final bool updatedOnline, - final bool performance, - final bool errorRate, - final bool eventCount, - final bool autoKeep, - }) = _$SmartAttributeFlagsImpl; - const _SmartAttributeFlags._() : super._(); - - factory _SmartAttributeFlags.fromJson(Map json) = - _$SmartAttributeFlagsImpl.fromJson; - - @override - int? get value; - @override - String? get string; - @override - bool get prefailure; - @override - bool get updatedOnline; - @override - bool get performance; - @override - bool get errorRate; - @override - bool get eventCount; - @override - bool get autoKeep; - - /// Create a copy of SmartAttributeFlags - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$SmartAttributeFlagsImplCopyWith<_$SmartAttributeFlagsImpl> get copyWith => - throw _privateConstructorUsedError; +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _SmartAttributeFlags&&(identical(other.value, value) || other.value == value)&&(identical(other.string, string) || other.string == string)&&(identical(other.prefailure, prefailure) || other.prefailure == prefailure)&&(identical(other.updatedOnline, updatedOnline) || other.updatedOnline == updatedOnline)&&(identical(other.performance, performance) || other.performance == performance)&&(identical(other.errorRate, errorRate) || other.errorRate == errorRate)&&(identical(other.eventCount, eventCount) || other.eventCount == eventCount)&&(identical(other.autoKeep, autoKeep) || other.autoKeep == autoKeep)); } + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,value,string,prefailure,updatedOnline,performance,errorRate,eventCount,autoKeep); + + + +} + +/// @nodoc +abstract mixin class _$SmartAttributeFlagsCopyWith<$Res> implements $SmartAttributeFlagsCopyWith<$Res> { + factory _$SmartAttributeFlagsCopyWith(_SmartAttributeFlags value, $Res Function(_SmartAttributeFlags) _then) = __$SmartAttributeFlagsCopyWithImpl; +@override @useResult +$Res call({ + int? value, String? string, bool prefailure, bool updatedOnline, bool performance, bool errorRate, bool eventCount, bool autoKeep +}); + + + + +} +/// @nodoc +class __$SmartAttributeFlagsCopyWithImpl<$Res> + implements _$SmartAttributeFlagsCopyWith<$Res> { + __$SmartAttributeFlagsCopyWithImpl(this._self, this._then); + + final _SmartAttributeFlags _self; + final $Res Function(_SmartAttributeFlags) _then; + +/// Create a copy of SmartAttributeFlags +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? value = freezed,Object? string = freezed,Object? prefailure = null,Object? updatedOnline = null,Object? performance = null,Object? errorRate = null,Object? eventCount = null,Object? autoKeep = null,}) { + return _then(_SmartAttributeFlags( +value: freezed == value ? _self.value : value // ignore: cast_nullable_to_non_nullable +as int?,string: freezed == string ? _self.string : string // ignore: cast_nullable_to_non_nullable +as String?,prefailure: null == prefailure ? _self.prefailure : prefailure // ignore: cast_nullable_to_non_nullable +as bool,updatedOnline: null == updatedOnline ? _self.updatedOnline : updatedOnline // ignore: cast_nullable_to_non_nullable +as bool,performance: null == performance ? _self.performance : performance // ignore: cast_nullable_to_non_nullable +as bool,errorRate: null == errorRate ? _self.errorRate : errorRate // ignore: cast_nullable_to_non_nullable +as bool,eventCount: null == eventCount ? _self.eventCount : eventCount // ignore: cast_nullable_to_non_nullable +as bool,autoKeep: null == autoKeep ? _self.autoKeep : autoKeep // ignore: cast_nullable_to_non_nullable +as bool, + )); +} + + +} + +// dart format on diff --git a/lib/data/model/server/disk_smart.g.dart b/lib/data/model/server/disk_smart.g.dart index 4cb0dc17..d365c4b8 100644 --- a/lib/data/model/server/disk_smart.g.dart +++ b/lib/data/model/server/disk_smart.g.dart @@ -6,23 +6,21 @@ part of 'disk_smart.dart'; // JsonSerializableGenerator // ************************************************************************** -_$DiskSmartImpl _$$DiskSmartImplFromJson(Map json) => - _$DiskSmartImpl( - device: json['device'] as String, - healthy: json['healthy'] as bool?, - temperature: (json['temperature'] as num?)?.toDouble(), - model: json['model'] as String?, - serial: json['serial'] as String?, - powerOnHours: (json['powerOnHours'] as num?)?.toInt(), - powerCycleCount: (json['powerCycleCount'] as num?)?.toInt(), - rawData: json['rawData'] as Map, - smartAttributes: (json['smartAttributes'] as Map).map( - (k, e) => - MapEntry(k, SmartAttribute.fromJson(e as Map)), - ), - ); +_DiskSmart _$DiskSmartFromJson(Map json) => _DiskSmart( + device: json['device'] as String, + healthy: json['healthy'] as bool?, + temperature: (json['temperature'] as num?)?.toDouble(), + model: json['model'] as String?, + serial: json['serial'] as String?, + powerOnHours: (json['powerOnHours'] as num?)?.toInt(), + powerCycleCount: (json['powerCycleCount'] as num?)?.toInt(), + rawData: json['rawData'] as Map, + smartAttributes: (json['smartAttributes'] as Map).map( + (k, e) => MapEntry(k, SmartAttribute.fromJson(e as Map)), + ), +); -Map _$$DiskSmartImplToJson(_$DiskSmartImpl instance) => +Map _$DiskSmartToJson(_DiskSmart instance) => { 'device': instance.device, 'healthy': instance.healthy, @@ -35,8 +33,8 @@ Map _$$DiskSmartImplToJson(_$DiskSmartImpl instance) => 'smartAttributes': instance.smartAttributes, }; -_$SmartAttributeImpl _$$SmartAttributeImplFromJson(Map json) => - _$SmartAttributeImpl( +_SmartAttribute _$SmartAttributeFromJson(Map json) => + _SmartAttribute( id: (json['id'] as num?)?.toInt(), name: json['name'] as String, value: (json['value'] as num?)?.toInt(), @@ -50,35 +48,33 @@ _$SmartAttributeImpl _$$SmartAttributeImplFromJson(Map json) => ), ); -Map _$$SmartAttributeImplToJson( - _$SmartAttributeImpl instance, -) => { - 'id': instance.id, - 'name': instance.name, - 'value': instance.value, - 'worst': instance.worst, - 'thresh': instance.thresh, - 'whenFailed': instance.whenFailed, - 'rawValue': instance.rawValue, - 'rawString': instance.rawString, - 'flags': instance.flags, -}; +Map _$SmartAttributeToJson(_SmartAttribute instance) => + { + 'id': instance.id, + 'name': instance.name, + 'value': instance.value, + 'worst': instance.worst, + 'thresh': instance.thresh, + 'whenFailed': instance.whenFailed, + 'rawValue': instance.rawValue, + 'rawString': instance.rawString, + 'flags': instance.flags, + }; -_$SmartAttributeFlagsImpl _$$SmartAttributeFlagsImplFromJson( - Map json, -) => _$SmartAttributeFlagsImpl( - value: (json['value'] as num?)?.toInt(), - string: json['string'] as String?, - prefailure: json['prefailure'] as bool? ?? false, - updatedOnline: json['updatedOnline'] as bool? ?? false, - performance: json['performance'] as bool? ?? false, - errorRate: json['errorRate'] as bool? ?? false, - eventCount: json['eventCount'] as bool? ?? false, - autoKeep: json['autoKeep'] as bool? ?? false, -); +_SmartAttributeFlags _$SmartAttributeFlagsFromJson(Map json) => + _SmartAttributeFlags( + value: (json['value'] as num?)?.toInt(), + string: json['string'] as String?, + prefailure: json['prefailure'] as bool? ?? false, + updatedOnline: json['updatedOnline'] as bool? ?? false, + performance: json['performance'] as bool? ?? false, + errorRate: json['errorRate'] as bool? ?? false, + eventCount: json['eventCount'] as bool? ?? false, + autoKeep: json['autoKeep'] as bool? ?? false, + ); -Map _$$SmartAttributeFlagsImplToJson( - _$SmartAttributeFlagsImpl instance, +Map _$SmartAttributeFlagsToJson( + _SmartAttributeFlags instance, ) => { 'value': instance.value, 'string': instance.string, diff --git a/lib/data/model/server/server_private_info.dart b/lib/data/model/server/server_private_info.dart index bb6aa455..174a1ec3 100644 --- a/lib/data/model/server/server_private_info.dart +++ b/lib/data/model/server/server_private_info.dart @@ -2,7 +2,6 @@ import 'dart:convert'; import 'package:fl_lib/fl_lib.dart'; import 'package:freezed_annotation/freezed_annotation.dart'; -import 'package:hive_ce_flutter/hive_flutter.dart'; import 'package:server_box/data/model/app/error.dart'; import 'package:server_box/data/model/server/custom.dart'; import 'package:server_box/data/model/server/server.dart'; @@ -19,11 +18,11 @@ part 'server_private_info.g.dart'; /// Some params named as `spi` in the codebase which is the abbreviation of `ServerPrivateInfo`. /// /// Nowaday, more fields are added to this class, and it's renamed to `Spi`. -@Freezed(fromJson: false) -@JsonSerializable(includeIfNull: false) -class Spi with _$Spi { +@freezed +abstract class Spi with _$Spi { const Spi._(); + @JsonSerializable(includeIfNull: false) const factory Spi({ required String name, required String ip, @@ -35,7 +34,7 @@ class Spi with _$Spi { @JsonKey(name: 'pubKeyId') String? keyId, List? tags, String? alterUrl, - @Default(true) @JsonKey(defaultValue: true) bool autoConnect, + @Default(true) bool autoConnect, /// [id] of the jump server String? jumpId, @@ -44,7 +43,7 @@ class Spi with _$Spi { /// It only applies to SSH terminal. Map? envs, - @JsonKey(fromJson: Spi.parseId) @HiveField(13, defaultValue: '') required String id, + @Default('') @JsonKey(fromJson: Spi.parseId) String id, }) = _Spi; factory Spi.fromJson(Map json) => _$SpiFromJson(json); diff --git a/lib/data/model/server/server_private_info.freezed.dart b/lib/data/model/server/server_private_info.freezed.dart index 0e059f5d..ed20a746 100644 --- a/lib/data/model/server/server_private_info.freezed.dart +++ b/lib/data/model/server/server_private_info.freezed.dart @@ -1,3 +1,4 @@ +// dart format width=80 // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint @@ -9,479 +10,193 @@ part of 'server_private_info.dart'; // FreezedGenerator // ************************************************************************** +// dart format off T _$identity(T value) => value; -final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models', -); - /// @nodoc mixin _$Spi { - String get name => throw _privateConstructorUsedError; - String get ip => throw _privateConstructorUsedError; - int get port => throw _privateConstructorUsedError; - String get user => throw _privateConstructorUsedError; - String? get pwd => throw _privateConstructorUsedError; - /// [id] of private key - @JsonKey(name: 'pubKeyId') - String? get keyId => throw _privateConstructorUsedError; - List? get tags => throw _privateConstructorUsedError; - String? get alterUrl => throw _privateConstructorUsedError; - @JsonKey(defaultValue: true) - bool get autoConnect => throw _privateConstructorUsedError; - - /// [id] of the jump server - String? get jumpId => throw _privateConstructorUsedError; - ServerCustom? get custom => throw _privateConstructorUsedError; - WakeOnLanCfg? get wolCfg => throw _privateConstructorUsedError; - - /// It only applies to SSH terminal. - Map? get envs => throw _privateConstructorUsedError; - @JsonKey(fromJson: Spi.parseId) - @HiveField(13, defaultValue: '') - String get id => throw _privateConstructorUsedError; + String get name; String get ip; int get port; String get user; String? get pwd;/// [id] of private key +@JsonKey(name: 'pubKeyId') String? get keyId; List? get tags; String? get alterUrl; bool get autoConnect;/// [id] of the jump server + String? get jumpId; ServerCustom? get custom; WakeOnLanCfg? get wolCfg;/// It only applies to SSH terminal. + Map? get envs;@JsonKey(fromJson: Spi.parseId) String get id; +/// Create a copy of Spi +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$SpiCopyWith get copyWith => _$SpiCopyWithImpl(this as Spi, _$identity); /// Serializes this Spi to a JSON map. - Map toJson() => throw _privateConstructorUsedError; + Map toJson(); + + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is Spi&&(identical(other.name, name) || other.name == name)&&(identical(other.ip, ip) || other.ip == ip)&&(identical(other.port, port) || other.port == port)&&(identical(other.user, user) || other.user == user)&&(identical(other.pwd, pwd) || other.pwd == pwd)&&(identical(other.keyId, keyId) || other.keyId == keyId)&&const DeepCollectionEquality().equals(other.tags, tags)&&(identical(other.alterUrl, alterUrl) || other.alterUrl == alterUrl)&&(identical(other.autoConnect, autoConnect) || other.autoConnect == autoConnect)&&(identical(other.jumpId, jumpId) || other.jumpId == jumpId)&&(identical(other.custom, custom) || other.custom == custom)&&(identical(other.wolCfg, wolCfg) || other.wolCfg == wolCfg)&&const DeepCollectionEquality().equals(other.envs, envs)&&(identical(other.id, id) || other.id == id)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,name,ip,port,user,pwd,keyId,const DeepCollectionEquality().hash(tags),alterUrl,autoConnect,jumpId,custom,wolCfg,const DeepCollectionEquality().hash(envs),id); + + - /// Create a copy of Spi - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - $SpiCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc -abstract class $SpiCopyWith<$Res> { - factory $SpiCopyWith(Spi value, $Res Function(Spi) then) = - _$SpiCopyWithImpl<$Res, Spi>; - @useResult - $Res call({ - String name, - String ip, - int port, - String user, - String? pwd, - @JsonKey(name: 'pubKeyId') String? keyId, - List? tags, - String? alterUrl, - @JsonKey(defaultValue: true) bool autoConnect, - String? jumpId, - ServerCustom? custom, - WakeOnLanCfg? wolCfg, - Map? envs, - @JsonKey(fromJson: Spi.parseId) @HiveField(13, defaultValue: '') String id, - }); +abstract mixin class $SpiCopyWith<$Res> { + factory $SpiCopyWith(Spi value, $Res Function(Spi) _then) = _$SpiCopyWithImpl; +@useResult +$Res call({ + String name, String ip, int port, String user, String? pwd,@JsonKey(name: 'pubKeyId') String? keyId, List? tags, String? alterUrl, bool autoConnect, String? jumpId, ServerCustom? custom, WakeOnLanCfg? wolCfg, Map? envs,@JsonKey(fromJson: Spi.parseId) String id +}); + + + + +} +/// @nodoc +class _$SpiCopyWithImpl<$Res> + implements $SpiCopyWith<$Res> { + _$SpiCopyWithImpl(this._self, this._then); + + final Spi _self; + final $Res Function(Spi) _then; + +/// Create a copy of Spi +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? name = null,Object? ip = null,Object? port = null,Object? user = null,Object? pwd = freezed,Object? keyId = freezed,Object? tags = freezed,Object? alterUrl = freezed,Object? autoConnect = null,Object? jumpId = freezed,Object? custom = freezed,Object? wolCfg = freezed,Object? envs = freezed,Object? id = null,}) { + return _then(_self.copyWith( +name: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable +as String,ip: null == ip ? _self.ip : ip // ignore: cast_nullable_to_non_nullable +as String,port: null == port ? _self.port : port // ignore: cast_nullable_to_non_nullable +as int,user: null == user ? _self.user : user // ignore: cast_nullable_to_non_nullable +as String,pwd: freezed == pwd ? _self.pwd : pwd // ignore: cast_nullable_to_non_nullable +as String?,keyId: freezed == keyId ? _self.keyId : keyId // ignore: cast_nullable_to_non_nullable +as String?,tags: freezed == tags ? _self.tags : tags // ignore: cast_nullable_to_non_nullable +as List?,alterUrl: freezed == alterUrl ? _self.alterUrl : alterUrl // ignore: cast_nullable_to_non_nullable +as String?,autoConnect: null == autoConnect ? _self.autoConnect : autoConnect // ignore: cast_nullable_to_non_nullable +as bool,jumpId: freezed == jumpId ? _self.jumpId : jumpId // ignore: cast_nullable_to_non_nullable +as String?,custom: freezed == custom ? _self.custom : custom // ignore: cast_nullable_to_non_nullable +as ServerCustom?,wolCfg: freezed == wolCfg ? _self.wolCfg : wolCfg // ignore: cast_nullable_to_non_nullable +as WakeOnLanCfg?,envs: freezed == envs ? _self.envs : envs // ignore: cast_nullable_to_non_nullable +as Map?,id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable +as String, + )); +} + +} + + +/// @nodoc + +@JsonSerializable(includeIfNull: false) +class _Spi extends Spi { + const _Spi({required this.name, required this.ip, required this.port, required this.user, this.pwd, @JsonKey(name: 'pubKeyId') this.keyId, final List? tags, this.alterUrl, this.autoConnect = true, this.jumpId, this.custom, this.wolCfg, final Map? envs, @JsonKey(fromJson: Spi.parseId) this.id = ''}): _tags = tags,_envs = envs,super._(); + factory _Spi.fromJson(Map json) => _$SpiFromJson(json); + +@override final String name; +@override final String ip; +@override final int port; +@override final String user; +@override final String? pwd; +/// [id] of private key +@override@JsonKey(name: 'pubKeyId') final String? keyId; + final List? _tags; +@override List? get tags { + final value = _tags; + if (value == null) return null; + if (_tags is EqualUnmodifiableListView) return _tags; + // ignore: implicit_dynamic_type + return EqualUnmodifiableListView(value); +} + +@override final String? alterUrl; +@override@JsonKey() final bool autoConnect; +/// [id] of the jump server +@override final String? jumpId; +@override final ServerCustom? custom; +@override final WakeOnLanCfg? wolCfg; +/// It only applies to SSH terminal. + final Map? _envs; +/// It only applies to SSH terminal. +@override Map? get envs { + final value = _envs; + if (value == null) return null; + if (_envs is EqualUnmodifiableMapView) return _envs; + // ignore: implicit_dynamic_type + return EqualUnmodifiableMapView(value); +} + +@override@JsonKey(fromJson: Spi.parseId) final String id; + +/// Create a copy of Spi +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$SpiCopyWith<_Spi> get copyWith => __$SpiCopyWithImpl<_Spi>(this, _$identity); + +@override +Map toJson() { + return _$SpiToJson(this, ); +} + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _Spi&&(identical(other.name, name) || other.name == name)&&(identical(other.ip, ip) || other.ip == ip)&&(identical(other.port, port) || other.port == port)&&(identical(other.user, user) || other.user == user)&&(identical(other.pwd, pwd) || other.pwd == pwd)&&(identical(other.keyId, keyId) || other.keyId == keyId)&&const DeepCollectionEquality().equals(other._tags, _tags)&&(identical(other.alterUrl, alterUrl) || other.alterUrl == alterUrl)&&(identical(other.autoConnect, autoConnect) || other.autoConnect == autoConnect)&&(identical(other.jumpId, jumpId) || other.jumpId == jumpId)&&(identical(other.custom, custom) || other.custom == custom)&&(identical(other.wolCfg, wolCfg) || other.wolCfg == wolCfg)&&const DeepCollectionEquality().equals(other._envs, _envs)&&(identical(other.id, id) || other.id == id)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,name,ip,port,user,pwd,keyId,const DeepCollectionEquality().hash(_tags),alterUrl,autoConnect,jumpId,custom,wolCfg,const DeepCollectionEquality().hash(_envs),id); + + + } /// @nodoc -class _$SpiCopyWithImpl<$Res, $Val extends Spi> implements $SpiCopyWith<$Res> { - _$SpiCopyWithImpl(this._value, this._then); +abstract mixin class _$SpiCopyWith<$Res> implements $SpiCopyWith<$Res> { + factory _$SpiCopyWith(_Spi value, $Res Function(_Spi) _then) = __$SpiCopyWithImpl; +@override @useResult +$Res call({ + String name, String ip, int port, String user, String? pwd,@JsonKey(name: 'pubKeyId') String? keyId, List? tags, String? alterUrl, bool autoConnect, String? jumpId, ServerCustom? custom, WakeOnLanCfg? wolCfg, Map? envs,@JsonKey(fromJson: Spi.parseId) String id +}); + + - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; - /// Create a copy of Spi - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? name = null, - Object? ip = null, - Object? port = null, - Object? user = null, - Object? pwd = freezed, - Object? keyId = freezed, - Object? tags = freezed, - Object? alterUrl = freezed, - Object? autoConnect = null, - Object? jumpId = freezed, - Object? custom = freezed, - Object? wolCfg = freezed, - Object? envs = freezed, - Object? id = null, - }) { - return _then( - _value.copyWith( - name: null == name - ? _value.name - : name // ignore: cast_nullable_to_non_nullable - as String, - ip: null == ip - ? _value.ip - : ip // ignore: cast_nullable_to_non_nullable - as String, - port: null == port - ? _value.port - : port // ignore: cast_nullable_to_non_nullable - as int, - user: null == user - ? _value.user - : user // ignore: cast_nullable_to_non_nullable - as String, - pwd: freezed == pwd - ? _value.pwd - : pwd // ignore: cast_nullable_to_non_nullable - as String?, - keyId: freezed == keyId - ? _value.keyId - : keyId // ignore: cast_nullable_to_non_nullable - as String?, - tags: freezed == tags - ? _value.tags - : tags // ignore: cast_nullable_to_non_nullable - as List?, - alterUrl: freezed == alterUrl - ? _value.alterUrl - : alterUrl // ignore: cast_nullable_to_non_nullable - as String?, - autoConnect: null == autoConnect - ? _value.autoConnect - : autoConnect // ignore: cast_nullable_to_non_nullable - as bool, - jumpId: freezed == jumpId - ? _value.jumpId - : jumpId // ignore: cast_nullable_to_non_nullable - as String?, - custom: freezed == custom - ? _value.custom - : custom // ignore: cast_nullable_to_non_nullable - as ServerCustom?, - wolCfg: freezed == wolCfg - ? _value.wolCfg - : wolCfg // ignore: cast_nullable_to_non_nullable - as WakeOnLanCfg?, - envs: freezed == envs - ? _value.envs - : envs // ignore: cast_nullable_to_non_nullable - as Map?, - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as String, - ) - as $Val, - ); - } } - /// @nodoc -abstract class _$$SpiImplCopyWith<$Res> implements $SpiCopyWith<$Res> { - factory _$$SpiImplCopyWith(_$SpiImpl value, $Res Function(_$SpiImpl) then) = - __$$SpiImplCopyWithImpl<$Res>; - @override - @useResult - $Res call({ - String name, - String ip, - int port, - String user, - String? pwd, - @JsonKey(name: 'pubKeyId') String? keyId, - List? tags, - String? alterUrl, - @JsonKey(defaultValue: true) bool autoConnect, - String? jumpId, - ServerCustom? custom, - WakeOnLanCfg? wolCfg, - Map? envs, - @JsonKey(fromJson: Spi.parseId) @HiveField(13, defaultValue: '') String id, - }); +class __$SpiCopyWithImpl<$Res> + implements _$SpiCopyWith<$Res> { + __$SpiCopyWithImpl(this._self, this._then); + + final _Spi _self; + final $Res Function(_Spi) _then; + +/// Create a copy of Spi +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? name = null,Object? ip = null,Object? port = null,Object? user = null,Object? pwd = freezed,Object? keyId = freezed,Object? tags = freezed,Object? alterUrl = freezed,Object? autoConnect = null,Object? jumpId = freezed,Object? custom = freezed,Object? wolCfg = freezed,Object? envs = freezed,Object? id = null,}) { + return _then(_Spi( +name: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable +as String,ip: null == ip ? _self.ip : ip // ignore: cast_nullable_to_non_nullable +as String,port: null == port ? _self.port : port // ignore: cast_nullable_to_non_nullable +as int,user: null == user ? _self.user : user // ignore: cast_nullable_to_non_nullable +as String,pwd: freezed == pwd ? _self.pwd : pwd // ignore: cast_nullable_to_non_nullable +as String?,keyId: freezed == keyId ? _self.keyId : keyId // ignore: cast_nullable_to_non_nullable +as String?,tags: freezed == tags ? _self._tags : tags // ignore: cast_nullable_to_non_nullable +as List?,alterUrl: freezed == alterUrl ? _self.alterUrl : alterUrl // ignore: cast_nullable_to_non_nullable +as String?,autoConnect: null == autoConnect ? _self.autoConnect : autoConnect // ignore: cast_nullable_to_non_nullable +as bool,jumpId: freezed == jumpId ? _self.jumpId : jumpId // ignore: cast_nullable_to_non_nullable +as String?,custom: freezed == custom ? _self.custom : custom // ignore: cast_nullable_to_non_nullable +as ServerCustom?,wolCfg: freezed == wolCfg ? _self.wolCfg : wolCfg // ignore: cast_nullable_to_non_nullable +as WakeOnLanCfg?,envs: freezed == envs ? _self._envs : envs // ignore: cast_nullable_to_non_nullable +as Map?,id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable +as String, + )); } -/// @nodoc -class __$$SpiImplCopyWithImpl<$Res> extends _$SpiCopyWithImpl<$Res, _$SpiImpl> - implements _$$SpiImplCopyWith<$Res> { - __$$SpiImplCopyWithImpl(_$SpiImpl _value, $Res Function(_$SpiImpl) _then) - : super(_value, _then); - /// Create a copy of Spi - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? name = null, - Object? ip = null, - Object? port = null, - Object? user = null, - Object? pwd = freezed, - Object? keyId = freezed, - Object? tags = freezed, - Object? alterUrl = freezed, - Object? autoConnect = null, - Object? jumpId = freezed, - Object? custom = freezed, - Object? wolCfg = freezed, - Object? envs = freezed, - Object? id = null, - }) { - return _then( - _$SpiImpl( - name: null == name - ? _value.name - : name // ignore: cast_nullable_to_non_nullable - as String, - ip: null == ip - ? _value.ip - : ip // ignore: cast_nullable_to_non_nullable - as String, - port: null == port - ? _value.port - : port // ignore: cast_nullable_to_non_nullable - as int, - user: null == user - ? _value.user - : user // ignore: cast_nullable_to_non_nullable - as String, - pwd: freezed == pwd - ? _value.pwd - : pwd // ignore: cast_nullable_to_non_nullable - as String?, - keyId: freezed == keyId - ? _value.keyId - : keyId // ignore: cast_nullable_to_non_nullable - as String?, - tags: freezed == tags - ? _value._tags - : tags // ignore: cast_nullable_to_non_nullable - as List?, - alterUrl: freezed == alterUrl - ? _value.alterUrl - : alterUrl // ignore: cast_nullable_to_non_nullable - as String?, - autoConnect: null == autoConnect - ? _value.autoConnect - : autoConnect // ignore: cast_nullable_to_non_nullable - as bool, - jumpId: freezed == jumpId - ? _value.jumpId - : jumpId // ignore: cast_nullable_to_non_nullable - as String?, - custom: freezed == custom - ? _value.custom - : custom // ignore: cast_nullable_to_non_nullable - as ServerCustom?, - wolCfg: freezed == wolCfg - ? _value.wolCfg - : wolCfg // ignore: cast_nullable_to_non_nullable - as WakeOnLanCfg?, - envs: freezed == envs - ? _value._envs - : envs // ignore: cast_nullable_to_non_nullable - as Map?, - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as String, - ), - ); - } } -/// @nodoc -@JsonSerializable(createFactory: false) -class _$SpiImpl extends _Spi { - const _$SpiImpl({ - required this.name, - required this.ip, - required this.port, - required this.user, - this.pwd, - @JsonKey(name: 'pubKeyId') this.keyId, - final List? tags, - this.alterUrl, - @JsonKey(defaultValue: true) this.autoConnect = true, - this.jumpId, - this.custom, - this.wolCfg, - final Map? envs, - @JsonKey(fromJson: Spi.parseId) - @HiveField(13, defaultValue: '') - required this.id, - }) : _tags = tags, - _envs = envs, - super._(); - - @override - final String name; - @override - final String ip; - @override - final int port; - @override - final String user; - @override - final String? pwd; - - /// [id] of private key - @override - @JsonKey(name: 'pubKeyId') - final String? keyId; - final List? _tags; - @override - List? get tags { - final value = _tags; - if (value == null) return null; - if (_tags is EqualUnmodifiableListView) return _tags; - // ignore: implicit_dynamic_type - return EqualUnmodifiableListView(value); - } - - @override - final String? alterUrl; - @override - @JsonKey(defaultValue: true) - final bool autoConnect; - - /// [id] of the jump server - @override - final String? jumpId; - @override - final ServerCustom? custom; - @override - final WakeOnLanCfg? wolCfg; - - /// It only applies to SSH terminal. - final Map? _envs; - - /// It only applies to SSH terminal. - @override - Map? get envs { - final value = _envs; - if (value == null) return null; - if (_envs is EqualUnmodifiableMapView) return _envs; - // ignore: implicit_dynamic_type - return EqualUnmodifiableMapView(value); - } - - @override - @JsonKey(fromJson: Spi.parseId) - @HiveField(13, defaultValue: '') - final String id; - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$SpiImpl && - (identical(other.name, name) || other.name == name) && - (identical(other.ip, ip) || other.ip == ip) && - (identical(other.port, port) || other.port == port) && - (identical(other.user, user) || other.user == user) && - (identical(other.pwd, pwd) || other.pwd == pwd) && - (identical(other.keyId, keyId) || other.keyId == keyId) && - const DeepCollectionEquality().equals(other._tags, _tags) && - (identical(other.alterUrl, alterUrl) || - other.alterUrl == alterUrl) && - (identical(other.autoConnect, autoConnect) || - other.autoConnect == autoConnect) && - (identical(other.jumpId, jumpId) || other.jumpId == jumpId) && - (identical(other.custom, custom) || other.custom == custom) && - (identical(other.wolCfg, wolCfg) || other.wolCfg == wolCfg) && - const DeepCollectionEquality().equals(other._envs, _envs) && - (identical(other.id, id) || other.id == id)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash( - runtimeType, - name, - ip, - port, - user, - pwd, - keyId, - const DeepCollectionEquality().hash(_tags), - alterUrl, - autoConnect, - jumpId, - custom, - wolCfg, - const DeepCollectionEquality().hash(_envs), - id, - ); - - /// Create a copy of Spi - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @override - @pragma('vm:prefer-inline') - _$$SpiImplCopyWith<_$SpiImpl> get copyWith => - __$$SpiImplCopyWithImpl<_$SpiImpl>(this, _$identity); - - @override - Map toJson() { - return _$$SpiImplToJson(this); - } -} - -abstract class _Spi extends Spi { - const factory _Spi({ - required final String name, - required final String ip, - required final int port, - required final String user, - final String? pwd, - @JsonKey(name: 'pubKeyId') final String? keyId, - final List? tags, - final String? alterUrl, - @JsonKey(defaultValue: true) final bool autoConnect, - final String? jumpId, - final ServerCustom? custom, - final WakeOnLanCfg? wolCfg, - final Map? envs, - @JsonKey(fromJson: Spi.parseId) - @HiveField(13, defaultValue: '') - required final String id, - }) = _$SpiImpl; - const _Spi._() : super._(); - - @override - String get name; - @override - String get ip; - @override - int get port; - @override - String get user; - @override - String? get pwd; - - /// [id] of private key - @override - @JsonKey(name: 'pubKeyId') - String? get keyId; - @override - List? get tags; - @override - String? get alterUrl; - @override - @JsonKey(defaultValue: true) - bool get autoConnect; - - /// [id] of the jump server - @override - String? get jumpId; - @override - ServerCustom? get custom; - @override - WakeOnLanCfg? get wolCfg; - - /// It only applies to SSH terminal. - @override - Map? get envs; - @override - @JsonKey(fromJson: Spi.parseId) - @HiveField(13, defaultValue: '') - String get id; - - /// Create a copy of Spi - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$SpiImplCopyWith<_$SpiImpl> get copyWith => - throw _privateConstructorUsedError; -} +// dart format on diff --git a/lib/data/model/server/server_private_info.g.dart b/lib/data/model/server/server_private_info.g.dart index c5f5defb..6c332426 100644 --- a/lib/data/model/server/server_private_info.g.dart +++ b/lib/data/model/server/server_private_info.g.dart @@ -6,7 +6,7 @@ part of 'server_private_info.dart'; // JsonSerializableGenerator // ************************************************************************** -Spi _$SpiFromJson(Map json) => Spi( +_Spi _$SpiFromJson(Map json) => _Spi( name: json['name'] as String, ip: json['ip'] as String, port: (json['port'] as num).toInt(), @@ -26,10 +26,10 @@ Spi _$SpiFromJson(Map json) => Spi( envs: (json['envs'] as Map?)?.map( (k, e) => MapEntry(k, e as String), ), - id: Spi.parseId(json['id']), + id: json['id'] == null ? '' : Spi.parseId(json['id']), ); -Map _$SpiToJson(Spi instance) => { +Map _$SpiToJson(_Spi instance) => { 'name': instance.name, 'ip': instance.ip, 'port': instance.port, @@ -45,20 +45,3 @@ Map _$SpiToJson(Spi instance) => { if (instance.envs case final value?) 'envs': value, 'id': instance.id, }; - -Map _$$SpiImplToJson(_$SpiImpl instance) => { - 'name': instance.name, - 'ip': instance.ip, - 'port': instance.port, - 'user': instance.user, - 'pwd': instance.pwd, - 'pubKeyId': instance.keyId, - 'tags': instance.tags, - 'alterUrl': instance.alterUrl, - 'autoConnect': instance.autoConnect, - 'jumpId': instance.jumpId, - 'custom': instance.custom, - 'wolCfg': instance.wolCfg, - 'envs': instance.envs, - 'id': instance.id, -}; diff --git a/lib/data/model/server/snippet.dart b/lib/data/model/server/snippet.dart index 22d5b517..43de686a 100644 --- a/lib/data/model/server/snippet.dart +++ b/lib/data/model/server/snippet.dart @@ -9,7 +9,7 @@ part 'snippet.g.dart'; part 'snippet.freezed.dart'; @freezed -class Snippet with _$Snippet { +abstract class Snippet with _$Snippet { const factory Snippet({ required String name, required String script, diff --git a/lib/data/model/server/snippet.freezed.dart b/lib/data/model/server/snippet.freezed.dart index ce742d0f..b45f113c 100644 --- a/lib/data/model/server/snippet.freezed.dart +++ b/lib/data/model/server/snippet.freezed.dart @@ -1,3 +1,4 @@ +// dart format width=80 // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint @@ -9,280 +10,170 @@ part of 'snippet.dart'; // FreezedGenerator // ************************************************************************** +// dart format off T _$identity(T value) => value; -final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models', -); - -Snippet _$SnippetFromJson(Map json) { - return _Snippet.fromJson(json); -} - /// @nodoc mixin _$Snippet { - String get name => throw _privateConstructorUsedError; - String get script => throw _privateConstructorUsedError; - List? get tags => throw _privateConstructorUsedError; - String? get note => throw _privateConstructorUsedError; - /// List of server id that this snippet should be auto run on - List? get autoRunOn => throw _privateConstructorUsedError; + String get name; String get script; List? get tags; String? get note;/// List of server id that this snippet should be auto run on + List? get autoRunOn; +/// Create a copy of Snippet +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$SnippetCopyWith get copyWith => _$SnippetCopyWithImpl(this as Snippet, _$identity); /// Serializes this Snippet to a JSON map. - Map toJson() => throw _privateConstructorUsedError; + Map toJson(); + + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is Snippet&&(identical(other.name, name) || other.name == name)&&(identical(other.script, script) || other.script == script)&&const DeepCollectionEquality().equals(other.tags, tags)&&(identical(other.note, note) || other.note == note)&&const DeepCollectionEquality().equals(other.autoRunOn, autoRunOn)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,name,script,const DeepCollectionEquality().hash(tags),note,const DeepCollectionEquality().hash(autoRunOn)); + +@override +String toString() { + return 'Snippet(name: $name, script: $script, tags: $tags, note: $note, autoRunOn: $autoRunOn)'; +} + - /// Create a copy of Snippet - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - $SnippetCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc -abstract class $SnippetCopyWith<$Res> { - factory $SnippetCopyWith(Snippet value, $Res Function(Snippet) then) = - _$SnippetCopyWithImpl<$Res, Snippet>; - @useResult - $Res call({ - String name, - String script, - List? tags, - String? note, - List? autoRunOn, - }); -} +abstract mixin class $SnippetCopyWith<$Res> { + factory $SnippetCopyWith(Snippet value, $Res Function(Snippet) _then) = _$SnippetCopyWithImpl; +@useResult +$Res call({ + String name, String script, List? tags, String? note, List? autoRunOn +}); + + + +} /// @nodoc -class _$SnippetCopyWithImpl<$Res, $Val extends Snippet> +class _$SnippetCopyWithImpl<$Res> implements $SnippetCopyWith<$Res> { - _$SnippetCopyWithImpl(this._value, this._then); + _$SnippetCopyWithImpl(this._self, this._then); - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; + final Snippet _self; + final $Res Function(Snippet) _then; - /// Create a copy of Snippet - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? name = null, - Object? script = null, - Object? tags = freezed, - Object? note = freezed, - Object? autoRunOn = freezed, - }) { - return _then( - _value.copyWith( - name: null == name - ? _value.name - : name // ignore: cast_nullable_to_non_nullable - as String, - script: null == script - ? _value.script - : script // ignore: cast_nullable_to_non_nullable - as String, - tags: freezed == tags - ? _value.tags - : tags // ignore: cast_nullable_to_non_nullable - as List?, - note: freezed == note - ? _value.note - : note // ignore: cast_nullable_to_non_nullable - as String?, - autoRunOn: freezed == autoRunOn - ? _value.autoRunOn - : autoRunOn // ignore: cast_nullable_to_non_nullable - as List?, - ) - as $Val, - ); - } +/// Create a copy of Snippet +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? name = null,Object? script = null,Object? tags = freezed,Object? note = freezed,Object? autoRunOn = freezed,}) { + return _then(_self.copyWith( +name: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable +as String,script: null == script ? _self.script : script // ignore: cast_nullable_to_non_nullable +as String,tags: freezed == tags ? _self.tags : tags // ignore: cast_nullable_to_non_nullable +as List?,note: freezed == note ? _self.note : note // ignore: cast_nullable_to_non_nullable +as String?,autoRunOn: freezed == autoRunOn ? _self.autoRunOn : autoRunOn // ignore: cast_nullable_to_non_nullable +as List?, + )); } -/// @nodoc -abstract class _$$SnippetImplCopyWith<$Res> implements $SnippetCopyWith<$Res> { - factory _$$SnippetImplCopyWith( - _$SnippetImpl value, - $Res Function(_$SnippetImpl) then, - ) = __$$SnippetImplCopyWithImpl<$Res>; - @override - @useResult - $Res call({ - String name, - String script, - List? tags, - String? note, - List? autoRunOn, - }); } -/// @nodoc -class __$$SnippetImplCopyWithImpl<$Res> - extends _$SnippetCopyWithImpl<$Res, _$SnippetImpl> - implements _$$SnippetImplCopyWith<$Res> { - __$$SnippetImplCopyWithImpl( - _$SnippetImpl _value, - $Res Function(_$SnippetImpl) _then, - ) : super(_value, _then); - - /// Create a copy of Snippet - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? name = null, - Object? script = null, - Object? tags = freezed, - Object? note = freezed, - Object? autoRunOn = freezed, - }) { - return _then( - _$SnippetImpl( - name: null == name - ? _value.name - : name // ignore: cast_nullable_to_non_nullable - as String, - script: null == script - ? _value.script - : script // ignore: cast_nullable_to_non_nullable - as String, - tags: freezed == tags - ? _value._tags - : tags // ignore: cast_nullable_to_non_nullable - as List?, - note: freezed == note - ? _value.note - : note // ignore: cast_nullable_to_non_nullable - as String?, - autoRunOn: freezed == autoRunOn - ? _value._autoRunOn - : autoRunOn // ignore: cast_nullable_to_non_nullable - as List?, - ), - ); - } -} /// @nodoc @JsonSerializable() -class _$SnippetImpl implements _Snippet { - const _$SnippetImpl({ - required this.name, - required this.script, - final List? tags, - this.note, - final List? autoRunOn, - }) : _tags = tags, - _autoRunOn = autoRunOn; - factory _$SnippetImpl.fromJson(Map json) => - _$$SnippetImplFromJson(json); +class _Snippet implements Snippet { + const _Snippet({required this.name, required this.script, final List? tags, this.note, final List? autoRunOn}): _tags = tags,_autoRunOn = autoRunOn; + factory _Snippet.fromJson(Map json) => _$SnippetFromJson(json); - @override - final String name; - @override - final String script; - final List? _tags; - @override - List? get tags { - final value = _tags; - if (value == null) return null; - if (_tags is EqualUnmodifiableListView) return _tags; - // ignore: implicit_dynamic_type - return EqualUnmodifiableListView(value); - } - - @override - final String? note; - - /// List of server id that this snippet should be auto run on - final List? _autoRunOn; - - /// List of server id that this snippet should be auto run on - @override - List? get autoRunOn { - final value = _autoRunOn; - if (value == null) return null; - if (_autoRunOn is EqualUnmodifiableListView) return _autoRunOn; - // ignore: implicit_dynamic_type - return EqualUnmodifiableListView(value); - } - - @override - String toString() { - return 'Snippet(name: $name, script: $script, tags: $tags, note: $note, autoRunOn: $autoRunOn)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$SnippetImpl && - (identical(other.name, name) || other.name == name) && - (identical(other.script, script) || other.script == script) && - const DeepCollectionEquality().equals(other._tags, _tags) && - (identical(other.note, note) || other.note == note) && - const DeepCollectionEquality().equals( - other._autoRunOn, - _autoRunOn, - )); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash( - runtimeType, - name, - script, - const DeepCollectionEquality().hash(_tags), - note, - const DeepCollectionEquality().hash(_autoRunOn), - ); - - /// Create a copy of Snippet - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @override - @pragma('vm:prefer-inline') - _$$SnippetImplCopyWith<_$SnippetImpl> get copyWith => - __$$SnippetImplCopyWithImpl<_$SnippetImpl>(this, _$identity); - - @override - Map toJson() { - return _$$SnippetImplToJson(this); - } +@override final String name; +@override final String script; + final List? _tags; +@override List? get tags { + final value = _tags; + if (value == null) return null; + if (_tags is EqualUnmodifiableListView) return _tags; + // ignore: implicit_dynamic_type + return EqualUnmodifiableListView(value); } -abstract class _Snippet implements Snippet { - const factory _Snippet({ - required final String name, - required final String script, - final List? tags, - final String? note, - final List? autoRunOn, - }) = _$SnippetImpl; - - factory _Snippet.fromJson(Map json) = _$SnippetImpl.fromJson; - - @override - String get name; - @override - String get script; - @override - List? get tags; - @override - String? get note; - - /// List of server id that this snippet should be auto run on - @override - List? get autoRunOn; - - /// Create a copy of Snippet - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$SnippetImplCopyWith<_$SnippetImpl> get copyWith => - throw _privateConstructorUsedError; +@override final String? note; +/// List of server id that this snippet should be auto run on + final List? _autoRunOn; +/// List of server id that this snippet should be auto run on +@override List? get autoRunOn { + final value = _autoRunOn; + if (value == null) return null; + if (_autoRunOn is EqualUnmodifiableListView) return _autoRunOn; + // ignore: implicit_dynamic_type + return EqualUnmodifiableListView(value); } + + +/// Create a copy of Snippet +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$SnippetCopyWith<_Snippet> get copyWith => __$SnippetCopyWithImpl<_Snippet>(this, _$identity); + +@override +Map toJson() { + return _$SnippetToJson(this, ); +} + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _Snippet&&(identical(other.name, name) || other.name == name)&&(identical(other.script, script) || other.script == script)&&const DeepCollectionEquality().equals(other._tags, _tags)&&(identical(other.note, note) || other.note == note)&&const DeepCollectionEquality().equals(other._autoRunOn, _autoRunOn)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,name,script,const DeepCollectionEquality().hash(_tags),note,const DeepCollectionEquality().hash(_autoRunOn)); + +@override +String toString() { + return 'Snippet(name: $name, script: $script, tags: $tags, note: $note, autoRunOn: $autoRunOn)'; +} + + +} + +/// @nodoc +abstract mixin class _$SnippetCopyWith<$Res> implements $SnippetCopyWith<$Res> { + factory _$SnippetCopyWith(_Snippet value, $Res Function(_Snippet) _then) = __$SnippetCopyWithImpl; +@override @useResult +$Res call({ + String name, String script, List? tags, String? note, List? autoRunOn +}); + + + + +} +/// @nodoc +class __$SnippetCopyWithImpl<$Res> + implements _$SnippetCopyWith<$Res> { + __$SnippetCopyWithImpl(this._self, this._then); + + final _Snippet _self; + final $Res Function(_Snippet) _then; + +/// Create a copy of Snippet +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? name = null,Object? script = null,Object? tags = freezed,Object? note = freezed,Object? autoRunOn = freezed,}) { + return _then(_Snippet( +name: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable +as String,script: null == script ? _self.script : script // ignore: cast_nullable_to_non_nullable +as String,tags: freezed == tags ? _self._tags : tags // ignore: cast_nullable_to_non_nullable +as List?,note: freezed == note ? _self.note : note // ignore: cast_nullable_to_non_nullable +as String?,autoRunOn: freezed == autoRunOn ? _self._autoRunOn : autoRunOn // ignore: cast_nullable_to_non_nullable +as List?, + )); +} + + +} + +// dart format on diff --git a/lib/data/model/server/snippet.g.dart b/lib/data/model/server/snippet.g.dart index 1fc2bbbb..39c66a63 100644 --- a/lib/data/model/server/snippet.g.dart +++ b/lib/data/model/server/snippet.g.dart @@ -6,22 +6,20 @@ part of 'snippet.dart'; // JsonSerializableGenerator // ************************************************************************** -_$SnippetImpl _$$SnippetImplFromJson(Map json) => - _$SnippetImpl( - name: json['name'] as String, - script: json['script'] as String, - tags: (json['tags'] as List?)?.map((e) => e as String).toList(), - note: json['note'] as String?, - autoRunOn: (json['autoRunOn'] as List?) - ?.map((e) => e as String) - .toList(), - ); +_Snippet _$SnippetFromJson(Map json) => _Snippet( + name: json['name'] as String, + script: json['script'] as String, + tags: (json['tags'] as List?)?.map((e) => e as String).toList(), + note: json['note'] as String?, + autoRunOn: (json['autoRunOn'] as List?) + ?.map((e) => e as String) + .toList(), +); -Map _$$SnippetImplToJson(_$SnippetImpl instance) => - { - 'name': instance.name, - 'script': instance.script, - 'tags': instance.tags, - 'note': instance.note, - 'autoRunOn': instance.autoRunOn, - }; +Map _$SnippetToJson(_Snippet instance) => { + 'name': instance.name, + 'script': instance.script, + 'tags': instance.tags, + 'note': instance.note, + 'autoRunOn': instance.autoRunOn, +}; diff --git a/lib/data/provider/app.dart b/lib/data/provider/app.dart index c94bbd0c..40de951b 100644 --- a/lib/data/provider/app.dart +++ b/lib/data/provider/app.dart @@ -6,7 +6,7 @@ part 'app.g.dart'; part 'app.freezed.dart'; @freezed -class AppState with _$AppState { +abstract class AppState with _$AppState { const factory AppState({ @Default(false) bool desktopMode, }) = _AppState; diff --git a/lib/data/provider/app.freezed.dart b/lib/data/provider/app.freezed.dart index 604e3cd2..16b2b9a2 100644 --- a/lib/data/provider/app.freezed.dart +++ b/lib/data/provider/app.freezed.dart @@ -1,3 +1,4 @@ +// dart format width=80 // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint @@ -9,140 +10,133 @@ part of 'app.dart'; // FreezedGenerator // ************************************************************************** +// dart format off T _$identity(T value) => value; - -final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models', -); - /// @nodoc mixin _$AppState { - bool get desktopMode => throw _privateConstructorUsedError; - /// Create a copy of AppState - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - $AppStateCopyWith get copyWith => - throw _privateConstructorUsedError; + bool get desktopMode; +/// Create a copy of AppState +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$AppStateCopyWith get copyWith => _$AppStateCopyWithImpl(this as AppState, _$identity); + + + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is AppState&&(identical(other.desktopMode, desktopMode) || other.desktopMode == desktopMode)); +} + + +@override +int get hashCode => Object.hash(runtimeType,desktopMode); + +@override +String toString() { + return 'AppState(desktopMode: $desktopMode)'; +} + + } /// @nodoc -abstract class $AppStateCopyWith<$Res> { - factory $AppStateCopyWith(AppState value, $Res Function(AppState) then) = - _$AppStateCopyWithImpl<$Res, AppState>; - @useResult - $Res call({bool desktopMode}); -} +abstract mixin class $AppStateCopyWith<$Res> { + factory $AppStateCopyWith(AppState value, $Res Function(AppState) _then) = _$AppStateCopyWithImpl; +@useResult +$Res call({ + bool desktopMode +}); + + + +} /// @nodoc -class _$AppStateCopyWithImpl<$Res, $Val extends AppState> +class _$AppStateCopyWithImpl<$Res> implements $AppStateCopyWith<$Res> { - _$AppStateCopyWithImpl(this._value, this._then); + _$AppStateCopyWithImpl(this._self, this._then); - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; + final AppState _self; + final $Res Function(AppState) _then; - /// Create a copy of AppState - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({Object? desktopMode = null}) { - return _then( - _value.copyWith( - desktopMode: null == desktopMode - ? _value.desktopMode - : desktopMode // ignore: cast_nullable_to_non_nullable - as bool, - ) - as $Val, - ); - } +/// Create a copy of AppState +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? desktopMode = null,}) { + return _then(_self.copyWith( +desktopMode: null == desktopMode ? _self.desktopMode : desktopMode // ignore: cast_nullable_to_non_nullable +as bool, + )); } -/// @nodoc -abstract class _$$AppStateImplCopyWith<$Res> - implements $AppStateCopyWith<$Res> { - factory _$$AppStateImplCopyWith( - _$AppStateImpl value, - $Res Function(_$AppStateImpl) then, - ) = __$$AppStateImplCopyWithImpl<$Res>; - @override - @useResult - $Res call({bool desktopMode}); } -/// @nodoc -class __$$AppStateImplCopyWithImpl<$Res> - extends _$AppStateCopyWithImpl<$Res, _$AppStateImpl> - implements _$$AppStateImplCopyWith<$Res> { - __$$AppStateImplCopyWithImpl( - _$AppStateImpl _value, - $Res Function(_$AppStateImpl) _then, - ) : super(_value, _then); - - /// Create a copy of AppState - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({Object? desktopMode = null}) { - return _then( - _$AppStateImpl( - desktopMode: null == desktopMode - ? _value.desktopMode - : desktopMode // ignore: cast_nullable_to_non_nullable - as bool, - ), - ); - } -} /// @nodoc -class _$AppStateImpl implements _AppState { - const _$AppStateImpl({this.desktopMode = false}); - @override - @JsonKey() - final bool desktopMode; +class _AppState implements AppState { + const _AppState({this.desktopMode = false}); + - @override - String toString() { - return 'AppState(desktopMode: $desktopMode)'; - } +@override@JsonKey() final bool desktopMode; - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$AppStateImpl && - (identical(other.desktopMode, desktopMode) || - other.desktopMode == desktopMode)); - } +/// Create a copy of AppState +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$AppStateCopyWith<_AppState> get copyWith => __$AppStateCopyWithImpl<_AppState>(this, _$identity); - @override - int get hashCode => Object.hash(runtimeType, desktopMode); - /// Create a copy of AppState - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @override - @pragma('vm:prefer-inline') - _$$AppStateImplCopyWith<_$AppStateImpl> get copyWith => - __$$AppStateImplCopyWithImpl<_$AppStateImpl>(this, _$identity); + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _AppState&&(identical(other.desktopMode, desktopMode) || other.desktopMode == desktopMode)); } -abstract class _AppState implements AppState { - const factory _AppState({final bool desktopMode}) = _$AppStateImpl; - @override - bool get desktopMode; +@override +int get hashCode => Object.hash(runtimeType,desktopMode); - /// Create a copy of AppState - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$AppStateImplCopyWith<_$AppStateImpl> get copyWith => - throw _privateConstructorUsedError; +@override +String toString() { + return 'AppState(desktopMode: $desktopMode)'; } + + +} + +/// @nodoc +abstract mixin class _$AppStateCopyWith<$Res> implements $AppStateCopyWith<$Res> { + factory _$AppStateCopyWith(_AppState value, $Res Function(_AppState) _then) = __$AppStateCopyWithImpl; +@override @useResult +$Res call({ + bool desktopMode +}); + + + + +} +/// @nodoc +class __$AppStateCopyWithImpl<$Res> + implements _$AppStateCopyWith<$Res> { + __$AppStateCopyWithImpl(this._self, this._then); + + final _AppState _self; + final $Res Function(_AppState) _then; + +/// Create a copy of AppState +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? desktopMode = null,}) { + return _then(_AppState( +desktopMode: null == desktopMode ? _self.desktopMode : desktopMode // ignore: cast_nullable_to_non_nullable +as bool, + )); +} + + +} + +// dart format on