308 lines
11 KiB
Dart
308 lines
11 KiB
Dart
// GENERATED CODE - DO NOT MODIFY BY HAND
|
|
// coverage:ignore-file
|
|
// ignore_for_file: type=lint
|
|
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
|
|
|
|
part of 'scan_result.dart';
|
|
|
|
// **************************************************************************
|
|
// FreezedGenerator
|
|
// **************************************************************************
|
|
|
|
// dart format off
|
|
T _$identity<T>(T value) => value;
|
|
|
|
/// @nodoc
|
|
mixin _$ScanResult {
|
|
|
|
@JsonKey(name: 'scanned_paths') List<String> get scannedPaths; int get found; List<ServiceScanInfo> get created; List<ServiceScanInfo> get updated; List<String> get errors;
|
|
/// Create a copy of ScanResult
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
@pragma('vm:prefer-inline')
|
|
$ScanResultCopyWith<ScanResult> get copyWith => _$ScanResultCopyWithImpl<ScanResult>(this as ScanResult, _$identity);
|
|
|
|
/// Serializes this ScanResult to a JSON map.
|
|
Map<String, dynamic> toJson();
|
|
|
|
|
|
@override
|
|
bool operator ==(Object other) {
|
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is ScanResult&&const DeepCollectionEquality().equals(other.scannedPaths, scannedPaths)&&(identical(other.found, found) || other.found == found)&&const DeepCollectionEquality().equals(other.created, created)&&const DeepCollectionEquality().equals(other.updated, updated)&&const DeepCollectionEquality().equals(other.errors, errors));
|
|
}
|
|
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
@override
|
|
int get hashCode => Object.hash(runtimeType,const DeepCollectionEquality().hash(scannedPaths),found,const DeepCollectionEquality().hash(created),const DeepCollectionEquality().hash(updated),const DeepCollectionEquality().hash(errors));
|
|
|
|
@override
|
|
String toString() {
|
|
return 'ScanResult(scannedPaths: $scannedPaths, found: $found, created: $created, updated: $updated, errors: $errors)';
|
|
}
|
|
|
|
|
|
}
|
|
|
|
/// @nodoc
|
|
abstract mixin class $ScanResultCopyWith<$Res> {
|
|
factory $ScanResultCopyWith(ScanResult value, $Res Function(ScanResult) _then) = _$ScanResultCopyWithImpl;
|
|
@useResult
|
|
$Res call({
|
|
@JsonKey(name: 'scanned_paths') List<String> scannedPaths, int found, List<ServiceScanInfo> created, List<ServiceScanInfo> updated, List<String> errors
|
|
});
|
|
|
|
|
|
|
|
|
|
}
|
|
/// @nodoc
|
|
class _$ScanResultCopyWithImpl<$Res>
|
|
implements $ScanResultCopyWith<$Res> {
|
|
_$ScanResultCopyWithImpl(this._self, this._then);
|
|
|
|
final ScanResult _self;
|
|
final $Res Function(ScanResult) _then;
|
|
|
|
/// Create a copy of ScanResult
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@pragma('vm:prefer-inline') @override $Res call({Object? scannedPaths = null,Object? found = null,Object? created = null,Object? updated = null,Object? errors = null,}) {
|
|
return _then(_self.copyWith(
|
|
scannedPaths: null == scannedPaths ? _self.scannedPaths : scannedPaths // ignore: cast_nullable_to_non_nullable
|
|
as List<String>,found: null == found ? _self.found : found // ignore: cast_nullable_to_non_nullable
|
|
as int,created: null == created ? _self.created : created // ignore: cast_nullable_to_non_nullable
|
|
as List<ServiceScanInfo>,updated: null == updated ? _self.updated : updated // ignore: cast_nullable_to_non_nullable
|
|
as List<ServiceScanInfo>,errors: null == errors ? _self.errors : errors // ignore: cast_nullable_to_non_nullable
|
|
as List<String>,
|
|
));
|
|
}
|
|
|
|
}
|
|
|
|
|
|
/// Adds pattern-matching-related methods to [ScanResult].
|
|
extension ScanResultPatterns on ScanResult {
|
|
/// A variant of `map` that fallback to returning `orElse`.
|
|
///
|
|
/// It is equivalent to doing:
|
|
/// ```dart
|
|
/// switch (sealedClass) {
|
|
/// case final Subclass value:
|
|
/// return ...;
|
|
/// case _:
|
|
/// return orElse();
|
|
/// }
|
|
/// ```
|
|
|
|
@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _ScanResult value)? $default,{required TResult orElse(),}){
|
|
final _that = this;
|
|
switch (_that) {
|
|
case _ScanResult() when $default != null:
|
|
return $default(_that);case _:
|
|
return orElse();
|
|
|
|
}
|
|
}
|
|
/// A `switch`-like method, using callbacks.
|
|
///
|
|
/// Callbacks receives the raw object, upcasted.
|
|
/// It is equivalent to doing:
|
|
/// ```dart
|
|
/// switch (sealedClass) {
|
|
/// case final Subclass value:
|
|
/// return ...;
|
|
/// case final Subclass2 value:
|
|
/// return ...;
|
|
/// }
|
|
/// ```
|
|
|
|
@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _ScanResult value) $default,){
|
|
final _that = this;
|
|
switch (_that) {
|
|
case _ScanResult():
|
|
return $default(_that);}
|
|
}
|
|
/// A variant of `map` that fallback to returning `null`.
|
|
///
|
|
/// It is equivalent to doing:
|
|
/// ```dart
|
|
/// switch (sealedClass) {
|
|
/// case final Subclass value:
|
|
/// return ...;
|
|
/// case _:
|
|
/// return null;
|
|
/// }
|
|
/// ```
|
|
|
|
@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _ScanResult value)? $default,){
|
|
final _that = this;
|
|
switch (_that) {
|
|
case _ScanResult() when $default != null:
|
|
return $default(_that);case _:
|
|
return null;
|
|
|
|
}
|
|
}
|
|
/// A variant of `when` that fallback to an `orElse` callback.
|
|
///
|
|
/// It is equivalent to doing:
|
|
/// ```dart
|
|
/// switch (sealedClass) {
|
|
/// case Subclass(:final field):
|
|
/// return ...;
|
|
/// case _:
|
|
/// return orElse();
|
|
/// }
|
|
/// ```
|
|
|
|
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function(@JsonKey(name: 'scanned_paths') List<String> scannedPaths, int found, List<ServiceScanInfo> created, List<ServiceScanInfo> updated, List<String> errors)? $default,{required TResult orElse(),}) {final _that = this;
|
|
switch (_that) {
|
|
case _ScanResult() when $default != null:
|
|
return $default(_that.scannedPaths,_that.found,_that.created,_that.updated,_that.errors);case _:
|
|
return orElse();
|
|
|
|
}
|
|
}
|
|
/// A `switch`-like method, using callbacks.
|
|
///
|
|
/// As opposed to `map`, this offers destructuring.
|
|
/// It is equivalent to doing:
|
|
/// ```dart
|
|
/// switch (sealedClass) {
|
|
/// case Subclass(:final field):
|
|
/// return ...;
|
|
/// case Subclass2(:final field2):
|
|
/// return ...;
|
|
/// }
|
|
/// ```
|
|
|
|
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function(@JsonKey(name: 'scanned_paths') List<String> scannedPaths, int found, List<ServiceScanInfo> created, List<ServiceScanInfo> updated, List<String> errors) $default,) {final _that = this;
|
|
switch (_that) {
|
|
case _ScanResult():
|
|
return $default(_that.scannedPaths,_that.found,_that.created,_that.updated,_that.errors);}
|
|
}
|
|
/// A variant of `when` that fallback to returning `null`
|
|
///
|
|
/// It is equivalent to doing:
|
|
/// ```dart
|
|
/// switch (sealedClass) {
|
|
/// case Subclass(:final field):
|
|
/// return ...;
|
|
/// case _:
|
|
/// return null;
|
|
/// }
|
|
/// ```
|
|
|
|
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function(@JsonKey(name: 'scanned_paths') List<String> scannedPaths, int found, List<ServiceScanInfo> created, List<ServiceScanInfo> updated, List<String> errors)? $default,) {final _that = this;
|
|
switch (_that) {
|
|
case _ScanResult() when $default != null:
|
|
return $default(_that.scannedPaths,_that.found,_that.created,_that.updated,_that.errors);case _:
|
|
return null;
|
|
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
/// @nodoc
|
|
@JsonSerializable()
|
|
|
|
class _ScanResult implements ScanResult {
|
|
const _ScanResult({@JsonKey(name: 'scanned_paths') final List<String> scannedPaths = const <String>[], this.found = 0, final List<ServiceScanInfo> created = const <ServiceScanInfo>[], final List<ServiceScanInfo> updated = const <ServiceScanInfo>[], final List<String> errors = const <String>[]}): _scannedPaths = scannedPaths,_created = created,_updated = updated,_errors = errors;
|
|
factory _ScanResult.fromJson(Map<String, dynamic> json) => _$ScanResultFromJson(json);
|
|
|
|
final List<String> _scannedPaths;
|
|
@override@JsonKey(name: 'scanned_paths') List<String> get scannedPaths {
|
|
if (_scannedPaths is EqualUnmodifiableListView) return _scannedPaths;
|
|
// ignore: implicit_dynamic_type
|
|
return EqualUnmodifiableListView(_scannedPaths);
|
|
}
|
|
|
|
@override@JsonKey() final int found;
|
|
final List<ServiceScanInfo> _created;
|
|
@override@JsonKey() List<ServiceScanInfo> get created {
|
|
if (_created is EqualUnmodifiableListView) return _created;
|
|
// ignore: implicit_dynamic_type
|
|
return EqualUnmodifiableListView(_created);
|
|
}
|
|
|
|
final List<ServiceScanInfo> _updated;
|
|
@override@JsonKey() List<ServiceScanInfo> get updated {
|
|
if (_updated is EqualUnmodifiableListView) return _updated;
|
|
// ignore: implicit_dynamic_type
|
|
return EqualUnmodifiableListView(_updated);
|
|
}
|
|
|
|
final List<String> _errors;
|
|
@override@JsonKey() List<String> get errors {
|
|
if (_errors is EqualUnmodifiableListView) return _errors;
|
|
// ignore: implicit_dynamic_type
|
|
return EqualUnmodifiableListView(_errors);
|
|
}
|
|
|
|
|
|
/// Create a copy of ScanResult
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@override @JsonKey(includeFromJson: false, includeToJson: false)
|
|
@pragma('vm:prefer-inline')
|
|
_$ScanResultCopyWith<_ScanResult> get copyWith => __$ScanResultCopyWithImpl<_ScanResult>(this, _$identity);
|
|
|
|
@override
|
|
Map<String, dynamic> toJson() {
|
|
return _$ScanResultToJson(this, );
|
|
}
|
|
|
|
@override
|
|
bool operator ==(Object other) {
|
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is _ScanResult&&const DeepCollectionEquality().equals(other._scannedPaths, _scannedPaths)&&(identical(other.found, found) || other.found == found)&&const DeepCollectionEquality().equals(other._created, _created)&&const DeepCollectionEquality().equals(other._updated, _updated)&&const DeepCollectionEquality().equals(other._errors, _errors));
|
|
}
|
|
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
@override
|
|
int get hashCode => Object.hash(runtimeType,const DeepCollectionEquality().hash(_scannedPaths),found,const DeepCollectionEquality().hash(_created),const DeepCollectionEquality().hash(_updated),const DeepCollectionEquality().hash(_errors));
|
|
|
|
@override
|
|
String toString() {
|
|
return 'ScanResult(scannedPaths: $scannedPaths, found: $found, created: $created, updated: $updated, errors: $errors)';
|
|
}
|
|
|
|
|
|
}
|
|
|
|
/// @nodoc
|
|
abstract mixin class _$ScanResultCopyWith<$Res> implements $ScanResultCopyWith<$Res> {
|
|
factory _$ScanResultCopyWith(_ScanResult value, $Res Function(_ScanResult) _then) = __$ScanResultCopyWithImpl;
|
|
@override @useResult
|
|
$Res call({
|
|
@JsonKey(name: 'scanned_paths') List<String> scannedPaths, int found, List<ServiceScanInfo> created, List<ServiceScanInfo> updated, List<String> errors
|
|
});
|
|
|
|
|
|
|
|
|
|
}
|
|
/// @nodoc
|
|
class __$ScanResultCopyWithImpl<$Res>
|
|
implements _$ScanResultCopyWith<$Res> {
|
|
__$ScanResultCopyWithImpl(this._self, this._then);
|
|
|
|
final _ScanResult _self;
|
|
final $Res Function(_ScanResult) _then;
|
|
|
|
/// Create a copy of ScanResult
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@override @pragma('vm:prefer-inline') $Res call({Object? scannedPaths = null,Object? found = null,Object? created = null,Object? updated = null,Object? errors = null,}) {
|
|
return _then(_ScanResult(
|
|
scannedPaths: null == scannedPaths ? _self._scannedPaths : scannedPaths // ignore: cast_nullable_to_non_nullable
|
|
as List<String>,found: null == found ? _self.found : found // ignore: cast_nullable_to_non_nullable
|
|
as int,created: null == created ? _self._created : created // ignore: cast_nullable_to_non_nullable
|
|
as List<ServiceScanInfo>,updated: null == updated ? _self._updated : updated // ignore: cast_nullable_to_non_nullable
|
|
as List<ServiceScanInfo>,errors: null == errors ? _self._errors : errors // ignore: cast_nullable_to_non_nullable
|
|
as List<String>,
|
|
));
|
|
}
|
|
|
|
|
|
}
|
|
|
|
// dart format on
|