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

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

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





@override
bool operator ==(Object other) {
  return identical(this, other) || (other.runtimeType == runtimeType&&other is SocketError);
}


@override
int get hashCode => runtimeType.hashCode;

@override
String toString() {
  return 'SocketError()';
}


}

/// @nodoc
class $SocketErrorCopyWith<$Res>  {
$SocketErrorCopyWith(SocketError _, $Res Function(SocketError) __);
}


/// Adds pattern-matching-related methods to [SocketError].
extension SocketErrorPatterns on SocketError {
/// 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( _ConnectionFailed value)?  connectionFailed,TResult Function( _ConnectionTimeout value)?  connectionTimeout,TResult Function( _Disconnected value)?  disconnected,TResult Function( _PingTimeout value)?  pingTimeout,TResult Function( _NetworkUnavailable value)?  networkUnavailable,TResult Function( _InvalidURL value)?  invalidURL,TResult Function( _SendFailed value)?  sendFailed,TResult Function( _Unknown value)?  unknown,required TResult orElse(),}){
final _that = this;
switch (_that) {
case _ConnectionFailed() when connectionFailed != null:
return connectionFailed(_that);case _ConnectionTimeout() when connectionTimeout != null:
return connectionTimeout(_that);case _Disconnected() when disconnected != null:
return disconnected(_that);case _PingTimeout() when pingTimeout != null:
return pingTimeout(_that);case _NetworkUnavailable() when networkUnavailable != null:
return networkUnavailable(_that);case _InvalidURL() when invalidURL != null:
return invalidURL(_that);case _SendFailed() when sendFailed != null:
return sendFailed(_that);case _Unknown() when unknown != null:
return unknown(_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?>({required TResult Function( _ConnectionFailed value)  connectionFailed,required TResult Function( _ConnectionTimeout value)  connectionTimeout,required TResult Function( _Disconnected value)  disconnected,required TResult Function( _PingTimeout value)  pingTimeout,required TResult Function( _NetworkUnavailable value)  networkUnavailable,required TResult Function( _InvalidURL value)  invalidURL,required TResult Function( _SendFailed value)  sendFailed,required TResult Function( _Unknown value)  unknown,}){
final _that = this;
switch (_that) {
case _ConnectionFailed():
return connectionFailed(_that);case _ConnectionTimeout():
return connectionTimeout(_that);case _Disconnected():
return disconnected(_that);case _PingTimeout():
return pingTimeout(_that);case _NetworkUnavailable():
return networkUnavailable(_that);case _InvalidURL():
return invalidURL(_that);case _SendFailed():
return sendFailed(_that);case _Unknown():
return unknown(_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( _ConnectionFailed value)?  connectionFailed,TResult? Function( _ConnectionTimeout value)?  connectionTimeout,TResult? Function( _Disconnected value)?  disconnected,TResult? Function( _PingTimeout value)?  pingTimeout,TResult? Function( _NetworkUnavailable value)?  networkUnavailable,TResult? Function( _InvalidURL value)?  invalidURL,TResult? Function( _SendFailed value)?  sendFailed,TResult? Function( _Unknown value)?  unknown,}){
final _that = this;
switch (_that) {
case _ConnectionFailed() when connectionFailed != null:
return connectionFailed(_that);case _ConnectionTimeout() when connectionTimeout != null:
return connectionTimeout(_that);case _Disconnected() when disconnected != null:
return disconnected(_that);case _PingTimeout() when pingTimeout != null:
return pingTimeout(_that);case _NetworkUnavailable() when networkUnavailable != null:
return networkUnavailable(_that);case _InvalidURL() when invalidURL != null:
return invalidURL(_that);case _SendFailed() when sendFailed != null:
return sendFailed(_that);case _Unknown() when unknown != null:
return unknown(_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( String message)?  connectionFailed,TResult Function()?  connectionTimeout,TResult Function( String? reason)?  disconnected,TResult Function()?  pingTimeout,TResult Function()?  networkUnavailable,TResult Function( String url)?  invalidURL,TResult Function( String message)?  sendFailed,TResult Function( String? message)?  unknown,required TResult orElse(),}) {final _that = this;
switch (_that) {
case _ConnectionFailed() when connectionFailed != null:
return connectionFailed(_that.message);case _ConnectionTimeout() when connectionTimeout != null:
return connectionTimeout();case _Disconnected() when disconnected != null:
return disconnected(_that.reason);case _PingTimeout() when pingTimeout != null:
return pingTimeout();case _NetworkUnavailable() when networkUnavailable != null:
return networkUnavailable();case _InvalidURL() when invalidURL != null:
return invalidURL(_that.url);case _SendFailed() when sendFailed != null:
return sendFailed(_that.message);case _Unknown() when unknown != null:
return unknown(_that.message);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?>({required TResult Function( String message)  connectionFailed,required TResult Function()  connectionTimeout,required TResult Function( String? reason)  disconnected,required TResult Function()  pingTimeout,required TResult Function()  networkUnavailable,required TResult Function( String url)  invalidURL,required TResult Function( String message)  sendFailed,required TResult Function( String? message)  unknown,}) {final _that = this;
switch (_that) {
case _ConnectionFailed():
return connectionFailed(_that.message);case _ConnectionTimeout():
return connectionTimeout();case _Disconnected():
return disconnected(_that.reason);case _PingTimeout():
return pingTimeout();case _NetworkUnavailable():
return networkUnavailable();case _InvalidURL():
return invalidURL(_that.url);case _SendFailed():
return sendFailed(_that.message);case _Unknown():
return unknown(_that.message);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( String message)?  connectionFailed,TResult? Function()?  connectionTimeout,TResult? Function( String? reason)?  disconnected,TResult? Function()?  pingTimeout,TResult? Function()?  networkUnavailable,TResult? Function( String url)?  invalidURL,TResult? Function( String message)?  sendFailed,TResult? Function( String? message)?  unknown,}) {final _that = this;
switch (_that) {
case _ConnectionFailed() when connectionFailed != null:
return connectionFailed(_that.message);case _ConnectionTimeout() when connectionTimeout != null:
return connectionTimeout();case _Disconnected() when disconnected != null:
return disconnected(_that.reason);case _PingTimeout() when pingTimeout != null:
return pingTimeout();case _NetworkUnavailable() when networkUnavailable != null:
return networkUnavailable();case _InvalidURL() when invalidURL != null:
return invalidURL(_that.url);case _SendFailed() when sendFailed != null:
return sendFailed(_that.message);case _Unknown() when unknown != null:
return unknown(_that.message);case _:
  return null;

}
}

}

/// @nodoc


class _ConnectionFailed implements SocketError {
  const _ConnectionFailed(this.message);
  

 final  String message;

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



@override
bool operator ==(Object other) {
  return identical(this, other) || (other.runtimeType == runtimeType&&other is _ConnectionFailed&&(identical(other.message, message) || other.message == message));
}


@override
int get hashCode => Object.hash(runtimeType,message);

@override
String toString() {
  return 'SocketError.connectionFailed(message: $message)';
}


}

/// @nodoc
abstract mixin class _$ConnectionFailedCopyWith<$Res> implements $SocketErrorCopyWith<$Res> {
  factory _$ConnectionFailedCopyWith(_ConnectionFailed value, $Res Function(_ConnectionFailed) _then) = __$ConnectionFailedCopyWithImpl;
@useResult
$Res call({
 String message
});




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

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

/// Create a copy of SocketError
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') $Res call({Object? message = null,}) {
  return _then(_ConnectionFailed(
null == message ? _self.message : message // ignore: cast_nullable_to_non_nullable
as String,
  ));
}


}

/// @nodoc


class _ConnectionTimeout implements SocketError {
  const _ConnectionTimeout();
  






@override
bool operator ==(Object other) {
  return identical(this, other) || (other.runtimeType == runtimeType&&other is _ConnectionTimeout);
}


@override
int get hashCode => runtimeType.hashCode;

@override
String toString() {
  return 'SocketError.connectionTimeout()';
}


}




/// @nodoc


class _Disconnected implements SocketError {
  const _Disconnected({this.reason});
  

 final  String? reason;

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



@override
bool operator ==(Object other) {
  return identical(this, other) || (other.runtimeType == runtimeType&&other is _Disconnected&&(identical(other.reason, reason) || other.reason == reason));
}


@override
int get hashCode => Object.hash(runtimeType,reason);

@override
String toString() {
  return 'SocketError.disconnected(reason: $reason)';
}


}

/// @nodoc
abstract mixin class _$DisconnectedCopyWith<$Res> implements $SocketErrorCopyWith<$Res> {
  factory _$DisconnectedCopyWith(_Disconnected value, $Res Function(_Disconnected) _then) = __$DisconnectedCopyWithImpl;
@useResult
$Res call({
 String? reason
});




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

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

/// Create a copy of SocketError
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') $Res call({Object? reason = freezed,}) {
  return _then(_Disconnected(
reason: freezed == reason ? _self.reason : reason // ignore: cast_nullable_to_non_nullable
as String?,
  ));
}


}

/// @nodoc


class _PingTimeout implements SocketError {
  const _PingTimeout();
  






@override
bool operator ==(Object other) {
  return identical(this, other) || (other.runtimeType == runtimeType&&other is _PingTimeout);
}


@override
int get hashCode => runtimeType.hashCode;

@override
String toString() {
  return 'SocketError.pingTimeout()';
}


}




/// @nodoc


class _NetworkUnavailable implements SocketError {
  const _NetworkUnavailable();
  






@override
bool operator ==(Object other) {
  return identical(this, other) || (other.runtimeType == runtimeType&&other is _NetworkUnavailable);
}


@override
int get hashCode => runtimeType.hashCode;

@override
String toString() {
  return 'SocketError.networkUnavailable()';
}


}




/// @nodoc


class _InvalidURL implements SocketError {
  const _InvalidURL(this.url);
  

 final  String url;

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



@override
bool operator ==(Object other) {
  return identical(this, other) || (other.runtimeType == runtimeType&&other is _InvalidURL&&(identical(other.url, url) || other.url == url));
}


@override
int get hashCode => Object.hash(runtimeType,url);

@override
String toString() {
  return 'SocketError.invalidURL(url: $url)';
}


}

/// @nodoc
abstract mixin class _$InvalidURLCopyWith<$Res> implements $SocketErrorCopyWith<$Res> {
  factory _$InvalidURLCopyWith(_InvalidURL value, $Res Function(_InvalidURL) _then) = __$InvalidURLCopyWithImpl;
@useResult
$Res call({
 String url
});




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

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

/// Create a copy of SocketError
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') $Res call({Object? url = null,}) {
  return _then(_InvalidURL(
null == url ? _self.url : url // ignore: cast_nullable_to_non_nullable
as String,
  ));
}


}

/// @nodoc


class _SendFailed implements SocketError {
  const _SendFailed(this.message);
  

 final  String message;

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



@override
bool operator ==(Object other) {
  return identical(this, other) || (other.runtimeType == runtimeType&&other is _SendFailed&&(identical(other.message, message) || other.message == message));
}


@override
int get hashCode => Object.hash(runtimeType,message);

@override
String toString() {
  return 'SocketError.sendFailed(message: $message)';
}


}

/// @nodoc
abstract mixin class _$SendFailedCopyWith<$Res> implements $SocketErrorCopyWith<$Res> {
  factory _$SendFailedCopyWith(_SendFailed value, $Res Function(_SendFailed) _then) = __$SendFailedCopyWithImpl;
@useResult
$Res call({
 String message
});




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

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

/// Create a copy of SocketError
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') $Res call({Object? message = null,}) {
  return _then(_SendFailed(
null == message ? _self.message : message // ignore: cast_nullable_to_non_nullable
as String,
  ));
}


}

/// @nodoc


class _Unknown implements SocketError {
  const _Unknown(this.message);
  

 final  String? message;

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



@override
bool operator ==(Object other) {
  return identical(this, other) || (other.runtimeType == runtimeType&&other is _Unknown&&(identical(other.message, message) || other.message == message));
}


@override
int get hashCode => Object.hash(runtimeType,message);

@override
String toString() {
  return 'SocketError.unknown(message: $message)';
}


}

/// @nodoc
abstract mixin class _$UnknownCopyWith<$Res> implements $SocketErrorCopyWith<$Res> {
  factory _$UnknownCopyWith(_Unknown value, $Res Function(_Unknown) _then) = __$UnknownCopyWithImpl;
@useResult
$Res call({
 String? message
});




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

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

/// Create a copy of SocketError
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') $Res call({Object? message = freezed,}) {
  return _then(_Unknown(
freezed == message ? _self.message : message // ignore: cast_nullable_to_non_nullable
as String?,
  ));
}


}

// dart format on
