// 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 value) => value; /// @nodoc mixin _$ScanResult { @JsonKey(name: 'scanned_paths') List get scannedPaths; int get found; List get created; List get updated; List 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 get copyWith => _$ScanResultCopyWithImpl(this as ScanResult, _$identity); /// Serializes this ScanResult to a JSON map. Map 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 scannedPaths, int found, List created, List updated, List 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,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,updated: null == updated ? _self.updated : updated // ignore: cast_nullable_to_non_nullable as List,errors: null == errors ? _self.errors : errors // ignore: cast_nullable_to_non_nullable as List, )); } } /// 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 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 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? 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 Function(@JsonKey(name: 'scanned_paths') List scannedPaths, int found, List created, List updated, List 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 Function(@JsonKey(name: 'scanned_paths') List scannedPaths, int found, List created, List updated, List 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? Function(@JsonKey(name: 'scanned_paths') List scannedPaths, int found, List created, List updated, List 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 scannedPaths = const [], this.found = 0, final List created = const [], final List updated = const [], final List errors = const []}): _scannedPaths = scannedPaths,_created = created,_updated = updated,_errors = errors; factory _ScanResult.fromJson(Map json) => _$ScanResultFromJson(json); final List _scannedPaths; @override@JsonKey(name: 'scanned_paths') List get scannedPaths { if (_scannedPaths is EqualUnmodifiableListView) return _scannedPaths; // ignore: implicit_dynamic_type return EqualUnmodifiableListView(_scannedPaths); } @override@JsonKey() final int found; final List _created; @override@JsonKey() List get created { if (_created is EqualUnmodifiableListView) return _created; // ignore: implicit_dynamic_type return EqualUnmodifiableListView(_created); } final List _updated; @override@JsonKey() List get updated { if (_updated is EqualUnmodifiableListView) return _updated; // ignore: implicit_dynamic_type return EqualUnmodifiableListView(_updated); } final List _errors; @override@JsonKey() List 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 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 scannedPaths, int found, List created, List updated, List 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,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,updated: null == updated ? _self._updated : updated // ignore: cast_nullable_to_non_nullable as List,errors: null == errors ? _self._errors : errors // ignore: cast_nullable_to_non_nullable as List, )); } } // dart format on