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

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

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

 UserEntity? get loggedUser; List<DeviceEntity> get devices; DeviceEntity? get selectedDevice; List<PositionEntity> get positions; PositionEntity? get selectedPosition;
/// Create a copy of HubViewState
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
$HubViewStateCopyWith<HubViewState> get copyWith => _$HubViewStateCopyWithImpl<HubViewState>(this as HubViewState, _$identity);



@override
bool operator ==(Object other) {
  return identical(this, other) || (other.runtimeType == runtimeType&&other is HubViewState&&(identical(other.loggedUser, loggedUser) || other.loggedUser == loggedUser)&&const DeepCollectionEquality().equals(other.devices, devices)&&(identical(other.selectedDevice, selectedDevice) || other.selectedDevice == selectedDevice)&&const DeepCollectionEquality().equals(other.positions, positions)&&(identical(other.selectedPosition, selectedPosition) || other.selectedPosition == selectedPosition));
}


@override
int get hashCode => Object.hash(runtimeType,loggedUser,const DeepCollectionEquality().hash(devices),selectedDevice,const DeepCollectionEquality().hash(positions),selectedPosition);

@override
String toString() {
  return 'HubViewState(loggedUser: $loggedUser, devices: $devices, selectedDevice: $selectedDevice, positions: $positions, selectedPosition: $selectedPosition)';
}


}

/// @nodoc
abstract mixin class $HubViewStateCopyWith<$Res>  {
  factory $HubViewStateCopyWith(HubViewState value, $Res Function(HubViewState) _then) = _$HubViewStateCopyWithImpl;
@useResult
$Res call({
 UserEntity? loggedUser, List<DeviceEntity> devices, DeviceEntity? selectedDevice, List<PositionEntity> positions, PositionEntity? selectedPosition
});


$UserEntityCopyWith<$Res>? get loggedUser;$DeviceEntityCopyWith<$Res>? get selectedDevice;$PositionEntityCopyWith<$Res>? get selectedPosition;

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

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

/// Create a copy of HubViewState
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @override $Res call({Object? loggedUser = freezed,Object? devices = null,Object? selectedDevice = freezed,Object? positions = null,Object? selectedPosition = freezed,}) {
  return _then(_self.copyWith(
loggedUser: freezed == loggedUser ? _self.loggedUser : loggedUser // ignore: cast_nullable_to_non_nullable
as UserEntity?,devices: null == devices ? _self.devices : devices // ignore: cast_nullable_to_non_nullable
as List<DeviceEntity>,selectedDevice: freezed == selectedDevice ? _self.selectedDevice : selectedDevice // ignore: cast_nullable_to_non_nullable
as DeviceEntity?,positions: null == positions ? _self.positions : positions // ignore: cast_nullable_to_non_nullable
as List<PositionEntity>,selectedPosition: freezed == selectedPosition ? _self.selectedPosition : selectedPosition // ignore: cast_nullable_to_non_nullable
as PositionEntity?,
  ));
}
/// Create a copy of HubViewState
/// 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));
  });
}/// Create a copy of HubViewState
/// with the given fields replaced by the non-null parameter values.
@override
@pragma('vm:prefer-inline')
$DeviceEntityCopyWith<$Res>? get selectedDevice {
    if (_self.selectedDevice == null) {
    return null;
  }

  return $DeviceEntityCopyWith<$Res>(_self.selectedDevice!, (value) {
    return _then(_self.copyWith(selectedDevice: value));
  });
}/// Create a copy of HubViewState
/// with the given fields replaced by the non-null parameter values.
@override
@pragma('vm:prefer-inline')
$PositionEntityCopyWith<$Res>? get selectedPosition {
    if (_self.selectedPosition == null) {
    return null;
  }

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


/// Adds pattern-matching-related methods to [HubViewState].
extension HubViewStatePatterns on HubViewState {
/// 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( _HubViewState value)?  $default,{required TResult orElse(),}){
final _that = this;
switch (_that) {
case _HubViewState() 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( _HubViewState value)  $default,){
final _that = this;
switch (_that) {
case _HubViewState():
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( _HubViewState value)?  $default,){
final _that = this;
switch (_that) {
case _HubViewState() 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( UserEntity? loggedUser,  List<DeviceEntity> devices,  DeviceEntity? selectedDevice,  List<PositionEntity> positions,  PositionEntity? selectedPosition)?  $default,{required TResult orElse(),}) {final _that = this;
switch (_that) {
case _HubViewState() when $default != null:
return $default(_that.loggedUser,_that.devices,_that.selectedDevice,_that.positions,_that.selectedPosition);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( UserEntity? loggedUser,  List<DeviceEntity> devices,  DeviceEntity? selectedDevice,  List<PositionEntity> positions,  PositionEntity? selectedPosition)  $default,) {final _that = this;
switch (_that) {
case _HubViewState():
return $default(_that.loggedUser,_that.devices,_that.selectedDevice,_that.positions,_that.selectedPosition);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( UserEntity? loggedUser,  List<DeviceEntity> devices,  DeviceEntity? selectedDevice,  List<PositionEntity> positions,  PositionEntity? selectedPosition)?  $default,) {final _that = this;
switch (_that) {
case _HubViewState() when $default != null:
return $default(_that.loggedUser,_that.devices,_that.selectedDevice,_that.positions,_that.selectedPosition);case _:
  return null;

}
}

}

/// @nodoc


class _HubViewState implements HubViewState {
  const _HubViewState({this.loggedUser, final  List<DeviceEntity> devices = const [], this.selectedDevice, final  List<PositionEntity> positions = const [], this.selectedPosition}): _devices = devices,_positions = positions;
  

@override final  UserEntity? loggedUser;
 final  List<DeviceEntity> _devices;
@override@JsonKey() List<DeviceEntity> get devices {
  if (_devices is EqualUnmodifiableListView) return _devices;
  // ignore: implicit_dynamic_type
  return EqualUnmodifiableListView(_devices);
}

@override final  DeviceEntity? selectedDevice;
 final  List<PositionEntity> _positions;
@override@JsonKey() List<PositionEntity> get positions {
  if (_positions is EqualUnmodifiableListView) return _positions;
  // ignore: implicit_dynamic_type
  return EqualUnmodifiableListView(_positions);
}

@override final  PositionEntity? selectedPosition;

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



@override
bool operator ==(Object other) {
  return identical(this, other) || (other.runtimeType == runtimeType&&other is _HubViewState&&(identical(other.loggedUser, loggedUser) || other.loggedUser == loggedUser)&&const DeepCollectionEquality().equals(other._devices, _devices)&&(identical(other.selectedDevice, selectedDevice) || other.selectedDevice == selectedDevice)&&const DeepCollectionEquality().equals(other._positions, _positions)&&(identical(other.selectedPosition, selectedPosition) || other.selectedPosition == selectedPosition));
}


@override
int get hashCode => Object.hash(runtimeType,loggedUser,const DeepCollectionEquality().hash(_devices),selectedDevice,const DeepCollectionEquality().hash(_positions),selectedPosition);

@override
String toString() {
  return 'HubViewState(loggedUser: $loggedUser, devices: $devices, selectedDevice: $selectedDevice, positions: $positions, selectedPosition: $selectedPosition)';
}


}

/// @nodoc
abstract mixin class _$HubViewStateCopyWith<$Res> implements $HubViewStateCopyWith<$Res> {
  factory _$HubViewStateCopyWith(_HubViewState value, $Res Function(_HubViewState) _then) = __$HubViewStateCopyWithImpl;
@override @useResult
$Res call({
 UserEntity? loggedUser, List<DeviceEntity> devices, DeviceEntity? selectedDevice, List<PositionEntity> positions, PositionEntity? selectedPosition
});


@override $UserEntityCopyWith<$Res>? get loggedUser;@override $DeviceEntityCopyWith<$Res>? get selectedDevice;@override $PositionEntityCopyWith<$Res>? get selectedPosition;

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

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

/// Create a copy of HubViewState
/// with the given fields replaced by the non-null parameter values.
@override @pragma('vm:prefer-inline') $Res call({Object? loggedUser = freezed,Object? devices = null,Object? selectedDevice = freezed,Object? positions = null,Object? selectedPosition = freezed,}) {
  return _then(_HubViewState(
loggedUser: freezed == loggedUser ? _self.loggedUser : loggedUser // ignore: cast_nullable_to_non_nullable
as UserEntity?,devices: null == devices ? _self._devices : devices // ignore: cast_nullable_to_non_nullable
as List<DeviceEntity>,selectedDevice: freezed == selectedDevice ? _self.selectedDevice : selectedDevice // ignore: cast_nullable_to_non_nullable
as DeviceEntity?,positions: null == positions ? _self._positions : positions // ignore: cast_nullable_to_non_nullable
as List<PositionEntity>,selectedPosition: freezed == selectedPosition ? _self.selectedPosition : selectedPosition // ignore: cast_nullable_to_non_nullable
as PositionEntity?,
  ));
}

/// Create a copy of HubViewState
/// 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));
  });
}/// Create a copy of HubViewState
/// with the given fields replaced by the non-null parameter values.
@override
@pragma('vm:prefer-inline')
$DeviceEntityCopyWith<$Res>? get selectedDevice {
    if (_self.selectedDevice == null) {
    return null;
  }

  return $DeviceEntityCopyWith<$Res>(_self.selectedDevice!, (value) {
    return _then(_self.copyWith(selectedDevice: value));
  });
}/// Create a copy of HubViewState
/// with the given fields replaced by the non-null parameter values.
@override
@pragma('vm:prefer-inline')
$PositionEntityCopyWith<$Res>? get selectedPosition {
    if (_self.selectedPosition == null) {
    return null;
  }

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

// dart format on
