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

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

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

/// @nodoc
mixin _$AllPoultry {

 User? get user; String? get key; String? get unitName; Address? get address; int? get lastHatchingRemainQuantity; bool? get provinceAllowSellFree; ChainCompany? get chainCompany;
/// Create a copy of AllPoultry
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
$AllPoultryCopyWith<AllPoultry> get copyWith => _$AllPoultryCopyWithImpl<AllPoultry>(this as AllPoultry, _$identity);

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


@override
bool operator ==(Object other) {
  return identical(this, other) || (other.runtimeType == runtimeType&&other is AllPoultry&&(identical(other.user, user) || other.user == user)&&(identical(other.key, key) || other.key == key)&&(identical(other.unitName, unitName) || other.unitName == unitName)&&(identical(other.address, address) || other.address == address)&&(identical(other.lastHatchingRemainQuantity, lastHatchingRemainQuantity) || other.lastHatchingRemainQuantity == lastHatchingRemainQuantity)&&(identical(other.provinceAllowSellFree, provinceAllowSellFree) || other.provinceAllowSellFree == provinceAllowSellFree)&&(identical(other.chainCompany, chainCompany) || other.chainCompany == chainCompany));
}

@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType,user,key,unitName,address,lastHatchingRemainQuantity,provinceAllowSellFree,chainCompany);

@override
String toString() {
  return 'AllPoultry(user: $user, key: $key, unitName: $unitName, address: $address, lastHatchingRemainQuantity: $lastHatchingRemainQuantity, provinceAllowSellFree: $provinceAllowSellFree, chainCompany: $chainCompany)';
}


}

/// @nodoc
abstract mixin class $AllPoultryCopyWith<$Res>  {
  factory $AllPoultryCopyWith(AllPoultry value, $Res Function(AllPoultry) _then) = _$AllPoultryCopyWithImpl;
@useResult
$Res call({
 User? user, String? key, String? unitName, Address? address, int? lastHatchingRemainQuantity, bool? provinceAllowSellFree, ChainCompany? chainCompany
});


$UserCopyWith<$Res>? get user;$AddressCopyWith<$Res>? get address;$ChainCompanyCopyWith<$Res>? get chainCompany;

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

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

/// Create a copy of AllPoultry
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @override $Res call({Object? user = freezed,Object? key = freezed,Object? unitName = freezed,Object? address = freezed,Object? lastHatchingRemainQuantity = freezed,Object? provinceAllowSellFree = freezed,Object? chainCompany = freezed,}) {
  return _then(_self.copyWith(
user: freezed == user ? _self.user : user // ignore: cast_nullable_to_non_nullable
as User?,key: freezed == key ? _self.key : key // ignore: cast_nullable_to_non_nullable
as String?,unitName: freezed == unitName ? _self.unitName : unitName // ignore: cast_nullable_to_non_nullable
as String?,address: freezed == address ? _self.address : address // ignore: cast_nullable_to_non_nullable
as Address?,lastHatchingRemainQuantity: freezed == lastHatchingRemainQuantity ? _self.lastHatchingRemainQuantity : lastHatchingRemainQuantity // ignore: cast_nullable_to_non_nullable
as int?,provinceAllowSellFree: freezed == provinceAllowSellFree ? _self.provinceAllowSellFree : provinceAllowSellFree // ignore: cast_nullable_to_non_nullable
as bool?,chainCompany: freezed == chainCompany ? _self.chainCompany : chainCompany // ignore: cast_nullable_to_non_nullable
as ChainCompany?,
  ));
}
/// Create a copy of AllPoultry
/// with the given fields replaced by the non-null parameter values.
@override
@pragma('vm:prefer-inline')
$UserCopyWith<$Res>? get user {
    if (_self.user == null) {
    return null;
  }

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

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

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


/// Adds pattern-matching-related methods to [AllPoultry].
extension AllPoultryPatterns on AllPoultry {
/// 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( _AllPoultry value)?  $default,{required TResult orElse(),}){
final _that = this;
switch (_that) {
case _AllPoultry() 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( _AllPoultry value)  $default,){
final _that = this;
switch (_that) {
case _AllPoultry():
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( _AllPoultry value)?  $default,){
final _that = this;
switch (_that) {
case _AllPoultry() 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( User? user,  String? key,  String? unitName,  Address? address,  int? lastHatchingRemainQuantity,  bool? provinceAllowSellFree,  ChainCompany? chainCompany)?  $default,{required TResult orElse(),}) {final _that = this;
switch (_that) {
case _AllPoultry() when $default != null:
return $default(_that.user,_that.key,_that.unitName,_that.address,_that.lastHatchingRemainQuantity,_that.provinceAllowSellFree,_that.chainCompany);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( User? user,  String? key,  String? unitName,  Address? address,  int? lastHatchingRemainQuantity,  bool? provinceAllowSellFree,  ChainCompany? chainCompany)  $default,) {final _that = this;
switch (_that) {
case _AllPoultry():
return $default(_that.user,_that.key,_that.unitName,_that.address,_that.lastHatchingRemainQuantity,_that.provinceAllowSellFree,_that.chainCompany);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( User? user,  String? key,  String? unitName,  Address? address,  int? lastHatchingRemainQuantity,  bool? provinceAllowSellFree,  ChainCompany? chainCompany)?  $default,) {final _that = this;
switch (_that) {
case _AllPoultry() when $default != null:
return $default(_that.user,_that.key,_that.unitName,_that.address,_that.lastHatchingRemainQuantity,_that.provinceAllowSellFree,_that.chainCompany);case _:
  return null;

}
}

}

/// @nodoc
@JsonSerializable()

class _AllPoultry implements AllPoultry {
  const _AllPoultry({this.user, this.key, this.unitName, this.address, this.lastHatchingRemainQuantity, this.provinceAllowSellFree, this.chainCompany});
  factory _AllPoultry.fromJson(Map<String, dynamic> json) => _$AllPoultryFromJson(json);

@override final  User? user;
@override final  String? key;
@override final  String? unitName;
@override final  Address? address;
@override final  int? lastHatchingRemainQuantity;
@override final  bool? provinceAllowSellFree;
@override final  ChainCompany? chainCompany;

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

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

@override
bool operator ==(Object other) {
  return identical(this, other) || (other.runtimeType == runtimeType&&other is _AllPoultry&&(identical(other.user, user) || other.user == user)&&(identical(other.key, key) || other.key == key)&&(identical(other.unitName, unitName) || other.unitName == unitName)&&(identical(other.address, address) || other.address == address)&&(identical(other.lastHatchingRemainQuantity, lastHatchingRemainQuantity) || other.lastHatchingRemainQuantity == lastHatchingRemainQuantity)&&(identical(other.provinceAllowSellFree, provinceAllowSellFree) || other.provinceAllowSellFree == provinceAllowSellFree)&&(identical(other.chainCompany, chainCompany) || other.chainCompany == chainCompany));
}

@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType,user,key,unitName,address,lastHatchingRemainQuantity,provinceAllowSellFree,chainCompany);

@override
String toString() {
  return 'AllPoultry(user: $user, key: $key, unitName: $unitName, address: $address, lastHatchingRemainQuantity: $lastHatchingRemainQuantity, provinceAllowSellFree: $provinceAllowSellFree, chainCompany: $chainCompany)';
}


}

/// @nodoc
abstract mixin class _$AllPoultryCopyWith<$Res> implements $AllPoultryCopyWith<$Res> {
  factory _$AllPoultryCopyWith(_AllPoultry value, $Res Function(_AllPoultry) _then) = __$AllPoultryCopyWithImpl;
@override @useResult
$Res call({
 User? user, String? key, String? unitName, Address? address, int? lastHatchingRemainQuantity, bool? provinceAllowSellFree, ChainCompany? chainCompany
});


@override $UserCopyWith<$Res>? get user;@override $AddressCopyWith<$Res>? get address;@override $ChainCompanyCopyWith<$Res>? get chainCompany;

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

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

/// Create a copy of AllPoultry
/// with the given fields replaced by the non-null parameter values.
@override @pragma('vm:prefer-inline') $Res call({Object? user = freezed,Object? key = freezed,Object? unitName = freezed,Object? address = freezed,Object? lastHatchingRemainQuantity = freezed,Object? provinceAllowSellFree = freezed,Object? chainCompany = freezed,}) {
  return _then(_AllPoultry(
user: freezed == user ? _self.user : user // ignore: cast_nullable_to_non_nullable
as User?,key: freezed == key ? _self.key : key // ignore: cast_nullable_to_non_nullable
as String?,unitName: freezed == unitName ? _self.unitName : unitName // ignore: cast_nullable_to_non_nullable
as String?,address: freezed == address ? _self.address : address // ignore: cast_nullable_to_non_nullable
as Address?,lastHatchingRemainQuantity: freezed == lastHatchingRemainQuantity ? _self.lastHatchingRemainQuantity : lastHatchingRemainQuantity // ignore: cast_nullable_to_non_nullable
as int?,provinceAllowSellFree: freezed == provinceAllowSellFree ? _self.provinceAllowSellFree : provinceAllowSellFree // ignore: cast_nullable_to_non_nullable
as bool?,chainCompany: freezed == chainCompany ? _self.chainCompany : chainCompany // ignore: cast_nullable_to_non_nullable
as ChainCompany?,
  ));
}

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

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

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

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


/// @nodoc
mixin _$User {

 String? get fullname; String? get mobile;
/// Create a copy of User
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
$UserCopyWith<User> get copyWith => _$UserCopyWithImpl<User>(this as User, _$identity);

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


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

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

@override
String toString() {
  return 'User(fullname: $fullname, mobile: $mobile)';
}


}

/// @nodoc
abstract mixin class $UserCopyWith<$Res>  {
  factory $UserCopyWith(User value, $Res Function(User) _then) = _$UserCopyWithImpl;
@useResult
$Res call({
 String? fullname, String? mobile
});




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

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

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

}


/// Adds pattern-matching-related methods to [User].
extension UserPatterns on User {
/// 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( _User value)?  $default,{required TResult orElse(),}){
final _that = this;
switch (_that) {
case _User() 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( _User value)  $default,){
final _that = this;
switch (_that) {
case _User():
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( _User value)?  $default,){
final _that = this;
switch (_that) {
case _User() 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? fullname,  String? mobile)?  $default,{required TResult orElse(),}) {final _that = this;
switch (_that) {
case _User() when $default != null:
return $default(_that.fullname,_that.mobile);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? fullname,  String? mobile)  $default,) {final _that = this;
switch (_that) {
case _User():
return $default(_that.fullname,_that.mobile);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? fullname,  String? mobile)?  $default,) {final _that = this;
switch (_that) {
case _User() when $default != null:
return $default(_that.fullname,_that.mobile);case _:
  return null;

}
}

}

/// @nodoc
@JsonSerializable()

class _User implements User {
  const _User({this.fullname, this.mobile});
  factory _User.fromJson(Map<String, dynamic> json) => _$UserFromJson(json);

@override final  String? fullname;
@override final  String? mobile;

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

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

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

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

@override
String toString() {
  return 'User(fullname: $fullname, mobile: $mobile)';
}


}

/// @nodoc
abstract mixin class _$UserCopyWith<$Res> implements $UserCopyWith<$Res> {
  factory _$UserCopyWith(_User value, $Res Function(_User) _then) = __$UserCopyWithImpl;
@override @useResult
$Res call({
 String? fullname, String? mobile
});




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

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

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


}


/// @nodoc
mixin _$Address {

 City? get city;
/// Create a copy of Address
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
$AddressCopyWith<Address> get copyWith => _$AddressCopyWithImpl<Address>(this as Address, _$identity);

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


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

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

@override
String toString() {
  return 'Address(city: $city)';
}


}

/// @nodoc
abstract mixin class $AddressCopyWith<$Res>  {
  factory $AddressCopyWith(Address value, $Res Function(Address) _then) = _$AddressCopyWithImpl;
@useResult
$Res call({
 City? city
});


$CityCopyWith<$Res>? get city;

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

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

/// Create a copy of Address
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @override $Res call({Object? city = freezed,}) {
  return _then(_self.copyWith(
city: freezed == city ? _self.city : city // ignore: cast_nullable_to_non_nullable
as City?,
  ));
}
/// Create a copy of Address
/// with the given fields replaced by the non-null parameter values.
@override
@pragma('vm:prefer-inline')
$CityCopyWith<$Res>? get city {
    if (_self.city == null) {
    return null;
  }

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


/// Adds pattern-matching-related methods to [Address].
extension AddressPatterns on Address {
/// 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( _Address value)?  $default,{required TResult orElse(),}){
final _that = this;
switch (_that) {
case _Address() 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( _Address value)  $default,){
final _that = this;
switch (_that) {
case _Address():
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( _Address value)?  $default,){
final _that = this;
switch (_that) {
case _Address() 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( City? city)?  $default,{required TResult orElse(),}) {final _that = this;
switch (_that) {
case _Address() when $default != null:
return $default(_that.city);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( City? city)  $default,) {final _that = this;
switch (_that) {
case _Address():
return $default(_that.city);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( City? city)?  $default,) {final _that = this;
switch (_that) {
case _Address() when $default != null:
return $default(_that.city);case _:
  return null;

}
}

}

/// @nodoc
@JsonSerializable()

class _Address implements Address {
  const _Address({this.city});
  factory _Address.fromJson(Map<String, dynamic> json) => _$AddressFromJson(json);

@override final  City? city;

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

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

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

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

@override
String toString() {
  return 'Address(city: $city)';
}


}

/// @nodoc
abstract mixin class _$AddressCopyWith<$Res> implements $AddressCopyWith<$Res> {
  factory _$AddressCopyWith(_Address value, $Res Function(_Address) _then) = __$AddressCopyWithImpl;
@override @useResult
$Res call({
 City? city
});


@override $CityCopyWith<$Res>? get city;

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

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

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

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

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


/// @nodoc
mixin _$City {

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

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


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

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

@override
String toString() {
  return 'City(name: $name)';
}


}

/// @nodoc
abstract mixin class $CityCopyWith<$Res>  {
  factory $CityCopyWith(City value, $Res Function(City) _then) = _$CityCopyWithImpl;
@useResult
$Res call({
 String? name
});




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

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

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

}


/// Adds pattern-matching-related methods to [City].
extension CityPatterns on City {
/// 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( _City value)?  $default,{required TResult orElse(),}){
final _that = this;
switch (_that) {
case _City() 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( _City value)  $default,){
final _that = this;
switch (_that) {
case _City():
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( _City value)?  $default,){
final _that = this;
switch (_that) {
case _City() 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? name)?  $default,{required TResult orElse(),}) {final _that = this;
switch (_that) {
case _City() when $default != null:
return $default(_that.name);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? name)  $default,) {final _that = this;
switch (_that) {
case _City():
return $default(_that.name);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? name)?  $default,) {final _that = this;
switch (_that) {
case _City() when $default != null:
return $default(_that.name);case _:
  return null;

}
}

}

/// @nodoc
@JsonSerializable()

class _City implements City {
  const _City({this.name});
  factory _City.fromJson(Map<String, dynamic> json) => _$CityFromJson(json);

@override final  String? name;

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

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

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

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

@override
String toString() {
  return 'City(name: $name)';
}


}

/// @nodoc
abstract mixin class _$CityCopyWith<$Res> implements $CityCopyWith<$Res> {
  factory _$CityCopyWith(_City value, $Res Function(_City) _then) = __$CityCopyWithImpl;
@override @useResult
$Res call({
 String? name
});




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

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

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


}


/// @nodoc
mixin _$ChainCompany {

 bool? get chainCompany; String? get hatchingKey;
/// Create a copy of ChainCompany
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
$ChainCompanyCopyWith<ChainCompany> get copyWith => _$ChainCompanyCopyWithImpl<ChainCompany>(this as ChainCompany, _$identity);

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


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

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

@override
String toString() {
  return 'ChainCompany(chainCompany: $chainCompany, hatchingKey: $hatchingKey)';
}


}

/// @nodoc
abstract mixin class $ChainCompanyCopyWith<$Res>  {
  factory $ChainCompanyCopyWith(ChainCompany value, $Res Function(ChainCompany) _then) = _$ChainCompanyCopyWithImpl;
@useResult
$Res call({
 bool? chainCompany, String? hatchingKey
});




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

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

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

}


/// Adds pattern-matching-related methods to [ChainCompany].
extension ChainCompanyPatterns on ChainCompany {
/// 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( _ChainCompany value)?  $default,{required TResult orElse(),}){
final _that = this;
switch (_that) {
case _ChainCompany() 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( _ChainCompany value)  $default,){
final _that = this;
switch (_that) {
case _ChainCompany():
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( _ChainCompany value)?  $default,){
final _that = this;
switch (_that) {
case _ChainCompany() 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? chainCompany,  String? hatchingKey)?  $default,{required TResult orElse(),}) {final _that = this;
switch (_that) {
case _ChainCompany() when $default != null:
return $default(_that.chainCompany,_that.hatchingKey);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? chainCompany,  String? hatchingKey)  $default,) {final _that = this;
switch (_that) {
case _ChainCompany():
return $default(_that.chainCompany,_that.hatchingKey);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? chainCompany,  String? hatchingKey)?  $default,) {final _that = this;
switch (_that) {
case _ChainCompany() when $default != null:
return $default(_that.chainCompany,_that.hatchingKey);case _:
  return null;

}
}

}

/// @nodoc
@JsonSerializable()

class _ChainCompany implements ChainCompany {
  const _ChainCompany({this.chainCompany, this.hatchingKey});
  factory _ChainCompany.fromJson(Map<String, dynamic> json) => _$ChainCompanyFromJson(json);

@override final  bool? chainCompany;
@override final  String? hatchingKey;

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

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

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

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

@override
String toString() {
  return 'ChainCompany(chainCompany: $chainCompany, hatchingKey: $hatchingKey)';
}


}

/// @nodoc
abstract mixin class _$ChainCompanyCopyWith<$Res> implements $ChainCompanyCopyWith<$Res> {
  factory _$ChainCompanyCopyWith(_ChainCompany value, $Res Function(_ChainCompany) _then) = __$ChainCompanyCopyWithImpl;
@override @useResult
$Res call({
 bool? chainCompany, String? hatchingKey
});




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

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

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


}

// dart format on
