// 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 'app_users_view_state.dart';

// **************************************************************************
// FreezedGenerator
// **************************************************************************

// dart format off
T _$identity<T>(T value) => value;
/// @nodoc
mixin _$AppUsersViewState {

 bool get isLoading; UserEntity? get loggedUser; List<UserEntity> get appUsers; bool get isEditing; String get errorMessage;
/// Create a copy of AppUsersViewState
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
$AppUsersViewStateCopyWith<AppUsersViewState> get copyWith => _$AppUsersViewStateCopyWithImpl<AppUsersViewState>(this as AppUsersViewState, _$identity);



@override
bool operator ==(Object other) {
  return identical(this, other) || (other.runtimeType == runtimeType&&other is AppUsersViewState&&(identical(other.isLoading, isLoading) || other.isLoading == isLoading)&&(identical(other.loggedUser, loggedUser) || other.loggedUser == loggedUser)&&const DeepCollectionEquality().equals(other.appUsers, appUsers)&&(identical(other.isEditing, isEditing) || other.isEditing == isEditing)&&(identical(other.errorMessage, errorMessage) || other.errorMessage == errorMessage));
}


@override
int get hashCode => Object.hash(runtimeType,isLoading,loggedUser,const DeepCollectionEquality().hash(appUsers),isEditing,errorMessage);

@override
String toString() {
  return 'AppUsersViewState(isLoading: $isLoading, loggedUser: $loggedUser, appUsers: $appUsers, isEditing: $isEditing, errorMessage: $errorMessage)';
}


}

/// @nodoc
abstract mixin class $AppUsersViewStateCopyWith<$Res>  {
  factory $AppUsersViewStateCopyWith(AppUsersViewState value, $Res Function(AppUsersViewState) _then) = _$AppUsersViewStateCopyWithImpl;
@useResult
$Res call({
 bool isLoading, UserEntity? loggedUser, List<UserEntity> appUsers, bool isEditing, String errorMessage
});


$UserEntityCopyWith<$Res>? get loggedUser;

}
/// @nodoc
class _$AppUsersViewStateCopyWithImpl<$Res>
    implements $AppUsersViewStateCopyWith<$Res> {
  _$AppUsersViewStateCopyWithImpl(this._self, this._then);

  final AppUsersViewState _self;
  final $Res Function(AppUsersViewState) _then;

/// Create a copy of AppUsersViewState
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @override $Res call({Object? isLoading = null,Object? loggedUser = freezed,Object? appUsers = null,Object? isEditing = null,Object? errorMessage = null,}) {
  return _then(_self.copyWith(
isLoading: null == isLoading ? _self.isLoading : isLoading // ignore: cast_nullable_to_non_nullable
as bool,loggedUser: freezed == loggedUser ? _self.loggedUser : loggedUser // ignore: cast_nullable_to_non_nullable
as UserEntity?,appUsers: null == appUsers ? _self.appUsers : appUsers // ignore: cast_nullable_to_non_nullable
as List<UserEntity>,isEditing: null == isEditing ? _self.isEditing : isEditing // ignore: cast_nullable_to_non_nullable
as bool,errorMessage: null == errorMessage ? _self.errorMessage : errorMessage // ignore: cast_nullable_to_non_nullable
as String,
  ));
}
/// Create a copy of AppUsersViewState
/// with the given fields replaced by the non-null parameter values.
@override
@pragma('vm:prefer-inline')
$UserEntityCopyWith<$Res>? get loggedUser {
    if (_self.loggedUser == null) {
    return null;
  }

  return $UserEntityCopyWith<$Res>(_self.loggedUser!, (value) {
    return _then(_self.copyWith(loggedUser: value));
  });
}
}


/// Adds pattern-matching-related methods to [AppUsersViewState].
extension AppUsersViewStatePatterns on AppUsersViewState {
/// 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( _AppUsersViewState value)?  $default,{required TResult orElse(),}){
final _that = this;
switch (_that) {
case _AppUsersViewState() 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( _AppUsersViewState value)  $default,){
final _that = this;
switch (_that) {
case _AppUsersViewState():
return $default(_that);case _:
  throw StateError('Unexpected subclass');

}
}
/// 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( _AppUsersViewState value)?  $default,){
final _that = this;
switch (_that) {
case _AppUsersViewState() 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( bool isLoading,  UserEntity? loggedUser,  List<UserEntity> appUsers,  bool isEditing,  String errorMessage)?  $default,{required TResult orElse(),}) {final _that = this;
switch (_that) {
case _AppUsersViewState() when $default != null:
return $default(_that.isLoading,_that.loggedUser,_that.appUsers,_that.isEditing,_that.errorMessage);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( bool isLoading,  UserEntity? loggedUser,  List<UserEntity> appUsers,  bool isEditing,  String errorMessage)  $default,) {final _that = this;
switch (_that) {
case _AppUsersViewState():
return $default(_that.isLoading,_that.loggedUser,_that.appUsers,_that.isEditing,_that.errorMessage);case _:
  throw StateError('Unexpected subclass');

}
}
/// 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( bool isLoading,  UserEntity? loggedUser,  List<UserEntity> appUsers,  bool isEditing,  String errorMessage)?  $default,) {final _that = this;
switch (_that) {
case _AppUsersViewState() when $default != null:
return $default(_that.isLoading,_that.loggedUser,_that.appUsers,_that.isEditing,_that.errorMessage);case _:
  return null;

}
}

}

/// @nodoc


class _AppUsersViewState implements AppUsersViewState {
  const _AppUsersViewState({this.isLoading = false, this.loggedUser = null, final  List<UserEntity> appUsers = const [], this.isEditing = false, this.errorMessage = ''}): _appUsers = appUsers;
  

@override@JsonKey() final  bool isLoading;
@override@JsonKey() final  UserEntity? loggedUser;
 final  List<UserEntity> _appUsers;
@override@JsonKey() List<UserEntity> get appUsers {
  if (_appUsers is EqualUnmodifiableListView) return _appUsers;
  // ignore: implicit_dynamic_type
  return EqualUnmodifiableListView(_appUsers);
}

@override@JsonKey() final  bool isEditing;
@override@JsonKey() final  String errorMessage;

/// Create a copy of AppUsersViewState
/// with the given fields replaced by the non-null parameter values.
@override @JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
_$AppUsersViewStateCopyWith<_AppUsersViewState> get copyWith => __$AppUsersViewStateCopyWithImpl<_AppUsersViewState>(this, _$identity);



@override
bool operator ==(Object other) {
  return identical(this, other) || (other.runtimeType == runtimeType&&other is _AppUsersViewState&&(identical(other.isLoading, isLoading) || other.isLoading == isLoading)&&(identical(other.loggedUser, loggedUser) || other.loggedUser == loggedUser)&&const DeepCollectionEquality().equals(other._appUsers, _appUsers)&&(identical(other.isEditing, isEditing) || other.isEditing == isEditing)&&(identical(other.errorMessage, errorMessage) || other.errorMessage == errorMessage));
}


@override
int get hashCode => Object.hash(runtimeType,isLoading,loggedUser,const DeepCollectionEquality().hash(_appUsers),isEditing,errorMessage);

@override
String toString() {
  return 'AppUsersViewState(isLoading: $isLoading, loggedUser: $loggedUser, appUsers: $appUsers, isEditing: $isEditing, errorMessage: $errorMessage)';
}


}

/// @nodoc
abstract mixin class _$AppUsersViewStateCopyWith<$Res> implements $AppUsersViewStateCopyWith<$Res> {
  factory _$AppUsersViewStateCopyWith(_AppUsersViewState value, $Res Function(_AppUsersViewState) _then) = __$AppUsersViewStateCopyWithImpl;
@override @useResult
$Res call({
 bool isLoading, UserEntity? loggedUser, List<UserEntity> appUsers, bool isEditing, String errorMessage
});


@override $UserEntityCopyWith<$Res>? get loggedUser;

}
/// @nodoc
class __$AppUsersViewStateCopyWithImpl<$Res>
    implements _$AppUsersViewStateCopyWith<$Res> {
  __$AppUsersViewStateCopyWithImpl(this._self, this._then);

  final _AppUsersViewState _self;
  final $Res Function(_AppUsersViewState) _then;

/// Create a copy of AppUsersViewState
/// with the given fields replaced by the non-null parameter values.
@override @pragma('vm:prefer-inline') $Res call({Object? isLoading = null,Object? loggedUser = freezed,Object? appUsers = null,Object? isEditing = null,Object? errorMessage = null,}) {
  return _then(_AppUsersViewState(
isLoading: null == isLoading ? _self.isLoading : isLoading // ignore: cast_nullable_to_non_nullable
as bool,loggedUser: freezed == loggedUser ? _self.loggedUser : loggedUser // ignore: cast_nullable_to_non_nullable
as UserEntity?,appUsers: null == appUsers ? _self._appUsers : appUsers // ignore: cast_nullable_to_non_nullable
as List<UserEntity>,isEditing: null == isEditing ? _self.isEditing : isEditing // ignore: cast_nullable_to_non_nullable
as bool,errorMessage: null == errorMessage ? _self.errorMessage : errorMessage // ignore: cast_nullable_to_non_nullable
as String,
  ));
}

/// Create a copy of AppUsersViewState
/// with the given fields replaced by the non-null parameter values.
@override
@pragma('vm:prefer-inline')
$UserEntityCopyWith<$Res>? get loggedUser {
    if (_self.loggedUser == null) {
    return null;
  }

  return $UserEntityCopyWith<$Res>(_self.loggedUser!, (value) {
    return _then(_self.copyWith(loggedUser: value));
  });
}
}

// dart format on
