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

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

// dart format off
T _$identity<T>(T value) => value;

/// @nodoc
mixin _$IconEntry {

@JsonKey(fromJson: _stringOrEmpty) String get name;@JsonKey(fromJson: _stringOrEmpty) String get url;
/// Create a copy of IconEntry
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
$IconEntryCopyWith<IconEntry> get copyWith => _$IconEntryCopyWithImpl<IconEntry>(this as IconEntry, _$identity);

  /// Serializes this IconEntry to a JSON map.
  Map<String, dynamic> toJson();


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

@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType,name,url);

@override
String toString() {
  return 'IconEntry(name: $name, url: $url)';
}


}

/// @nodoc
abstract mixin class $IconEntryCopyWith<$Res>  {
  factory $IconEntryCopyWith(IconEntry value, $Res Function(IconEntry) _then) = _$IconEntryCopyWithImpl;
@useResult
$Res call({
@JsonKey(fromJson: _stringOrEmpty) String name,@JsonKey(fromJson: _stringOrEmpty) String url
});




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

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

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

}


/// Adds pattern-matching-related methods to [IconEntry].
extension IconEntryPatterns on IconEntry {
/// 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( _IconEntry value)?  $default,{required TResult orElse(),}){
final _that = this;
switch (_that) {
case _IconEntry() 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( _IconEntry value)  $default,){
final _that = this;
switch (_that) {
case _IconEntry():
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( _IconEntry value)?  $default,){
final _that = this;
switch (_that) {
case _IconEntry() 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(@JsonKey(fromJson: _stringOrEmpty)  String name, @JsonKey(fromJson: _stringOrEmpty)  String url)?  $default,{required TResult orElse(),}) {final _that = this;
switch (_that) {
case _IconEntry() when $default != null:
return $default(_that.name,_that.url);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(@JsonKey(fromJson: _stringOrEmpty)  String name, @JsonKey(fromJson: _stringOrEmpty)  String url)  $default,) {final _that = this;
switch (_that) {
case _IconEntry():
return $default(_that.name,_that.url);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(@JsonKey(fromJson: _stringOrEmpty)  String name, @JsonKey(fromJson: _stringOrEmpty)  String url)?  $default,) {final _that = this;
switch (_that) {
case _IconEntry() when $default != null:
return $default(_that.name,_that.url);case _:
  return null;

}
}

}

/// @nodoc
@JsonSerializable()

class _IconEntry implements IconEntry {
  const _IconEntry({@JsonKey(fromJson: _stringOrEmpty) this.name = '', @JsonKey(fromJson: _stringOrEmpty) this.url = ''});
  factory _IconEntry.fromJson(Map<String, dynamic> json) => _$IconEntryFromJson(json);

@override@JsonKey(fromJson: _stringOrEmpty) final  String name;
@override@JsonKey(fromJson: _stringOrEmpty) final  String url;

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

@override
Map<String, dynamic> toJson() {
  return _$IconEntryToJson(this, );
}

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

@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType,name,url);

@override
String toString() {
  return 'IconEntry(name: $name, url: $url)';
}


}

/// @nodoc
abstract mixin class _$IconEntryCopyWith<$Res> implements $IconEntryCopyWith<$Res> {
  factory _$IconEntryCopyWith(_IconEntry value, $Res Function(_IconEntry) _then) = __$IconEntryCopyWithImpl;
@override @useResult
$Res call({
@JsonKey(fromJson: _stringOrEmpty) String name,@JsonKey(fromJson: _stringOrEmpty) String url
});




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

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

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


}


/// @nodoc
mixin _$IconLibrary {

/// 来源 URL（去除尾随斜杠后的标准化字符串）
 String get sourceUrl;@JsonKey(fromJson: _stringOrEmpty) String get name;@JsonKey(fromJson: _stringOrEmpty) String get description; List<IconEntry> get icons;
/// Create a copy of IconLibrary
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
$IconLibraryCopyWith<IconLibrary> get copyWith => _$IconLibraryCopyWithImpl<IconLibrary>(this as IconLibrary, _$identity);

  /// Serializes this IconLibrary to a JSON map.
  Map<String, dynamic> toJson();


@override
bool operator ==(Object other) {
  return identical(this, other) || (other.runtimeType == runtimeType&&other is IconLibrary&&(identical(other.sourceUrl, sourceUrl) || other.sourceUrl == sourceUrl)&&(identical(other.name, name) || other.name == name)&&(identical(other.description, description) || other.description == description)&&const DeepCollectionEquality().equals(other.icons, icons));
}

@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType,sourceUrl,name,description,const DeepCollectionEquality().hash(icons));

@override
String toString() {
  return 'IconLibrary(sourceUrl: $sourceUrl, name: $name, description: $description, icons: $icons)';
}


}

/// @nodoc
abstract mixin class $IconLibraryCopyWith<$Res>  {
  factory $IconLibraryCopyWith(IconLibrary value, $Res Function(IconLibrary) _then) = _$IconLibraryCopyWithImpl;
@useResult
$Res call({
 String sourceUrl,@JsonKey(fromJson: _stringOrEmpty) String name,@JsonKey(fromJson: _stringOrEmpty) String description, List<IconEntry> icons
});




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

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

/// Create a copy of IconLibrary
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @override $Res call({Object? sourceUrl = null,Object? name = null,Object? description = null,Object? icons = null,}) {
  return _then(_self.copyWith(
sourceUrl: null == sourceUrl ? _self.sourceUrl : sourceUrl // ignore: cast_nullable_to_non_nullable
as String,name: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable
as String,description: null == description ? _self.description : description // ignore: cast_nullable_to_non_nullable
as String,icons: null == icons ? _self.icons : icons // ignore: cast_nullable_to_non_nullable
as List<IconEntry>,
  ));
}

}


/// Adds pattern-matching-related methods to [IconLibrary].
extension IconLibraryPatterns on IconLibrary {
/// 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( _IconLibrary value)?  $default,{required TResult orElse(),}){
final _that = this;
switch (_that) {
case _IconLibrary() 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( _IconLibrary value)  $default,){
final _that = this;
switch (_that) {
case _IconLibrary():
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( _IconLibrary value)?  $default,){
final _that = this;
switch (_that) {
case _IconLibrary() 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( String sourceUrl, @JsonKey(fromJson: _stringOrEmpty)  String name, @JsonKey(fromJson: _stringOrEmpty)  String description,  List<IconEntry> icons)?  $default,{required TResult orElse(),}) {final _that = this;
switch (_that) {
case _IconLibrary() when $default != null:
return $default(_that.sourceUrl,_that.name,_that.description,_that.icons);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( String sourceUrl, @JsonKey(fromJson: _stringOrEmpty)  String name, @JsonKey(fromJson: _stringOrEmpty)  String description,  List<IconEntry> icons)  $default,) {final _that = this;
switch (_that) {
case _IconLibrary():
return $default(_that.sourceUrl,_that.name,_that.description,_that.icons);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 sourceUrl, @JsonKey(fromJson: _stringOrEmpty)  String name, @JsonKey(fromJson: _stringOrEmpty)  String description,  List<IconEntry> icons)?  $default,) {final _that = this;
switch (_that) {
case _IconLibrary() when $default != null:
return $default(_that.sourceUrl,_that.name,_that.description,_that.icons);case _:
  return null;

}
}

}

/// @nodoc
@JsonSerializable()

class _IconLibrary implements IconLibrary {
  const _IconLibrary({required this.sourceUrl, @JsonKey(fromJson: _stringOrEmpty) this.name = '', @JsonKey(fromJson: _stringOrEmpty) this.description = '', final  List<IconEntry> icons = const <IconEntry>[]}): _icons = icons;
  factory _IconLibrary.fromJson(Map<String, dynamic> json) => _$IconLibraryFromJson(json);

/// 来源 URL（去除尾随斜杠后的标准化字符串）
@override final  String sourceUrl;
@override@JsonKey(fromJson: _stringOrEmpty) final  String name;
@override@JsonKey(fromJson: _stringOrEmpty) final  String description;
 final  List<IconEntry> _icons;
@override@JsonKey() List<IconEntry> get icons {
  if (_icons is EqualUnmodifiableListView) return _icons;
  // ignore: implicit_dynamic_type
  return EqualUnmodifiableListView(_icons);
}


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

@override
Map<String, dynamic> toJson() {
  return _$IconLibraryToJson(this, );
}

@override
bool operator ==(Object other) {
  return identical(this, other) || (other.runtimeType == runtimeType&&other is _IconLibrary&&(identical(other.sourceUrl, sourceUrl) || other.sourceUrl == sourceUrl)&&(identical(other.name, name) || other.name == name)&&(identical(other.description, description) || other.description == description)&&const DeepCollectionEquality().equals(other._icons, _icons));
}

@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType,sourceUrl,name,description,const DeepCollectionEquality().hash(_icons));

@override
String toString() {
  return 'IconLibrary(sourceUrl: $sourceUrl, name: $name, description: $description, icons: $icons)';
}


}

/// @nodoc
abstract mixin class _$IconLibraryCopyWith<$Res> implements $IconLibraryCopyWith<$Res> {
  factory _$IconLibraryCopyWith(_IconLibrary value, $Res Function(_IconLibrary) _then) = __$IconLibraryCopyWithImpl;
@override @useResult
$Res call({
 String sourceUrl,@JsonKey(fromJson: _stringOrEmpty) String name,@JsonKey(fromJson: _stringOrEmpty) String description, List<IconEntry> icons
});




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

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

/// Create a copy of IconLibrary
/// with the given fields replaced by the non-null parameter values.
@override @pragma('vm:prefer-inline') $Res call({Object? sourceUrl = null,Object? name = null,Object? description = null,Object? icons = null,}) {
  return _then(_IconLibrary(
sourceUrl: null == sourceUrl ? _self.sourceUrl : sourceUrl // ignore: cast_nullable_to_non_nullable
as String,name: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable
as String,description: null == description ? _self.description : description // ignore: cast_nullable_to_non_nullable
as String,icons: null == icons ? _self._icons : icons // ignore: cast_nullable_to_non_nullable
as List<IconEntry>,
  ));
}


}

// dart format on
