// GENERATED CODE - DO NOT MODIFY BY HAND // coverage:ignore-file // ignore_for_file: type=lint, type=warning, deprecated_member_use, deprecated_member_use_from_same_package // 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 'password_policy.dart'; // ************************************************************************** // FreezedGenerator // ************************************************************************** // GENERATED CODE - DO NOT MODIFY BY HAND // dart format off T _$identity(T value) => value; /// @nodoc mixin _$PasswordError { @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType&&other is PasswordError); } @override int get hashCode => runtimeType.hashCode; @override String toString() { return 'PasswordError()'; } } /// @nodoc class $PasswordErrorCopyWith<$Res> { $PasswordErrorCopyWith(PasswordError _, $Res Function(PasswordError) __); } /// Adds pattern-matching-related methods to [PasswordError]. extension PasswordErrorPatterns on PasswordError { /// 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( PasswordTooShort value)? tooShort,TResult Function( PasswordCommon value)? common,required TResult orElse(),}){ final _that = this; switch (_that) { case PasswordTooShort() when tooShort != null: return tooShort(_that);case PasswordCommon() when common != null: return common(_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({required TResult Function( PasswordTooShort value) tooShort,required TResult Function( PasswordCommon value) common,}){ final _that = this; switch (_that) { case PasswordTooShort(): return tooShort(_that);case PasswordCommon(): return common(_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( PasswordTooShort value)? tooShort,TResult? Function( PasswordCommon value)? common,}){ final _that = this; switch (_that) { case PasswordTooShort() when tooShort != null: return tooShort(_that);case PasswordCommon() when common != null: return common(_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( int missing)? tooShort,TResult Function()? common,required TResult orElse(),}) {final _that = this; switch (_that) { case PasswordTooShort() when tooShort != null: return tooShort(_that.missing);case PasswordCommon() when common != null: return common();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({required TResult Function( int missing) tooShort,required TResult Function() common,}) {final _that = this; switch (_that) { case PasswordTooShort(): return tooShort(_that.missing);case PasswordCommon(): return common();} } /// 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( int missing)? tooShort,TResult? Function()? common,}) {final _that = this; switch (_that) { case PasswordTooShort() when tooShort != null: return tooShort(_that.missing);case PasswordCommon() when common != null: return common();case _: return null; } } } /// @nodoc class PasswordTooShort implements PasswordError { const PasswordTooShort(this.missing); final int missing; /// Create a copy of PasswordError /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @pragma('vm:prefer-inline') $PasswordTooShortCopyWith get copyWith => _$PasswordTooShortCopyWithImpl(this, _$identity); @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType&&other is PasswordTooShort&&(identical(other.missing, missing) || other.missing == missing)); } @override int get hashCode { return Object.hash(runtimeType,missing); } @override String toString() { return 'PasswordError.tooShort(missing: $missing)'; } } /// @nodoc abstract mixin class $PasswordTooShortCopyWith<$Res> implements $PasswordErrorCopyWith<$Res> { factory $PasswordTooShortCopyWith(PasswordTooShort value, $Res Function(PasswordTooShort) _then) = _$PasswordTooShortCopyWithImpl; @useResult $Res call({ int missing }); } /// @nodoc class _$PasswordTooShortCopyWithImpl<$Res> implements $PasswordTooShortCopyWith<$Res> { _$PasswordTooShortCopyWithImpl(this._self, this._then); final PasswordTooShort _self; final $Res Function(PasswordTooShort) _then; /// Create a copy of PasswordError /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') $Res call({Object? missing = null,}) { return _then(PasswordTooShort( null == missing ? _self.missing : missing // ignore: cast_nullable_to_non_nullable as int, )); } } /// @nodoc class PasswordCommon implements PasswordError { const PasswordCommon(); @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType&&other is PasswordCommon); } @override int get hashCode => runtimeType.hashCode; @override String toString() { return 'PasswordError.common()'; } } // dart format on