// 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 '../../../domain/models/user.dart';
// **************************************************************************
// FreezedGenerator
// **************************************************************************
// dart format off
T _$identity<T>(T value) => value;
/// @nodoc
mixin _$User {
String get userId; String get hmsId; String get firstName; String get lastName; String get phoneNumber; String get email; String get shopperReference; String get gender; String get companyId; String get companyName; String get symplifyId; String get signUpCampaign; String get signUpSource; String get locale; String get nationality; bool get emailVerified; bool get isClubMember; bool get wasRecentlyCreated; Address get address; int get points; DateTime? get birthDate; DateTime? get createDate; DateTime? get signUpDate;
/// 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);
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is User&&(identical(other.userId, userId) || other.userId == userId)&&(identical(other.hmsId, hmsId) || other.hmsId == hmsId)&&(identical(other.firstName, firstName) || other.firstName == firstName)&&(identical(other.lastName, lastName) || other.lastName == lastName)&&(identical(other.phoneNumber, phoneNumber) || other.phoneNumber == phoneNumber)&&(identical(other.email, email) || other.email == email)&&(identical(other.shopperReference, shopperReference) || other.shopperReference == shopperReference)&&(identical(other.gender, gender) || other.gender == gender)&&(identical(other.companyId, companyId) || other.companyId == companyId)&&(identical(other.companyName, companyName) || other.companyName == companyName)&&(identical(other.symplifyId, symplifyId) || other.symplifyId == symplifyId)&&(identical(other.signUpCampaign, signUpCampaign) || other.signUpCampaign == signUpCampaign)&&(identical(other.signUpSource, signUpSource) || other.signUpSource == signUpSource)&&(identical(other.locale, locale) || other.locale == locale)&&(identical(other.nationality, nationality) || other.nationality == nationality)&&(identical(other.emailVerified, emailVerified) || other.emailVerified == emailVerified)&&(identical(other.isClubMember, isClubMember) || other.isClubMember == isClubMember)&&(identical(other.wasRecentlyCreated, wasRecentlyCreated) || other.wasRecentlyCreated == wasRecentlyCreated)&&(identical(other.address, address) || other.address == address)&&(identical(other.points, points) || other.points == points)&&(identical(other.birthDate, birthDate) || other.birthDate == birthDate)&&(identical(other.createDate, createDate) || other.createDate == createDate)&&(identical(other.signUpDate, signUpDate) || other.signUpDate == signUpDate));
}
@override
int get hashCode => Object.hashAll([runtimeType,userId,hmsId,firstName,lastName,phoneNumber,email,shopperReference,gender,companyId,companyName,symplifyId,signUpCampaign,signUpSource,locale,nationality,emailVerified,isClubMember,wasRecentlyCreated,address,points,birthDate,createDate,signUpDate]);
@override
String toString() {
return 'User(userId: $userId, hmsId: $hmsId, firstName: $firstName, lastName: $lastName, phoneNumber: $phoneNumber, email: $email, shopperReference: $shopperReference, gender: $gender, companyId: $companyId, companyName: $companyName, symplifyId: $symplifyId, signUpCampaign: $signUpCampaign, signUpSource: $signUpSource, locale: $locale, nationality: $nationality, emailVerified: $emailVerified, isClubMember: $isClubMember, wasRecentlyCreated: $wasRecentlyCreated, address: $address, points: $points, birthDate: $birthDate, createDate: $createDate, signUpDate: $signUpDate)';
}
}
/// @nodoc
abstract mixin class $UserCopyWith<$Res> {
factory $UserCopyWith(User value, $Res Function(User) _then) = _$UserCopyWithImpl;
@useResult
$Res call({
String userId, String hmsId, String firstName, String lastName, String phoneNumber, String email, String shopperReference, String gender, String companyId, String companyName, String symplifyId, String signUpCampaign, String signUpSource, String locale, String nationality, bool emailVerified, bool isClubMember, bool wasRecentlyCreated, Address address, int points, DateTime? birthDate, DateTime? createDate, DateTime? signUpDate
});
$AddressCopyWith<$Res> get address;
}
/// @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? userId = null,Object? hmsId = null,Object? firstName = null,Object? lastName = null,Object? phoneNumber = null,Object? email = null,Object? shopperReference = null,Object? gender = null,Object? companyId = null,Object? companyName = null,Object? symplifyId = null,Object? signUpCampaign = null,Object? signUpSource = null,Object? locale = null,Object? nationality = null,Object? emailVerified = null,Object? isClubMember = null,Object? wasRecentlyCreated = null,Object? address = null,Object? points = null,Object? birthDate = freezed,Object? createDate = freezed,Object? signUpDate = freezed,}) {
return _then(_self.copyWith(
userId: null == userId ? _self.userId : userId // ignore: cast_nullable_to_non_nullable
as String,hmsId: null == hmsId ? _self.hmsId : hmsId // ignore: cast_nullable_to_non_nullable
as String,firstName: null == firstName ? _self.firstName : firstName // ignore: cast_nullable_to_non_nullable
as String,lastName: null == lastName ? _self.lastName : lastName // ignore: cast_nullable_to_non_nullable
as String,phoneNumber: null == phoneNumber ? _self.phoneNumber : phoneNumber // ignore: cast_nullable_to_non_nullable
as String,email: null == email ? _self.email : email // ignore: cast_nullable_to_non_nullable
as String,shopperReference: null == shopperReference ? _self.shopperReference : shopperReference // ignore: cast_nullable_to_non_nullable
as String,gender: null == gender ? _self.gender : gender // ignore: cast_nullable_to_non_nullable
as String,companyId: null == companyId ? _self.companyId : companyId // ignore: cast_nullable_to_non_nullable
as String,companyName: null == companyName ? _self.companyName : companyName // ignore: cast_nullable_to_non_nullable
as String,symplifyId: null == symplifyId ? _self.symplifyId : symplifyId // ignore: cast_nullable_to_non_nullable
as String,signUpCampaign: null == signUpCampaign ? _self.signUpCampaign : signUpCampaign // ignore: cast_nullable_to_non_nullable
as String,signUpSource: null == signUpSource ? _self.signUpSource : signUpSource // ignore: cast_nullable_to_non_nullable
as String,locale: null == locale ? _self.locale : locale // ignore: cast_nullable_to_non_nullable
as String,nationality: null == nationality ? _self.nationality : nationality // ignore: cast_nullable_to_non_nullable
as String,emailVerified: null == emailVerified ? _self.emailVerified : emailVerified // ignore: cast_nullable_to_non_nullable
as bool,isClubMember: null == isClubMember ? _self.isClubMember : isClubMember // ignore: cast_nullable_to_non_nullable
as bool,wasRecentlyCreated: null == wasRecentlyCreated ? _self.wasRecentlyCreated : wasRecentlyCreated // ignore: cast_nullable_to_non_nullable
as bool,address: null == address ? _self.address : address // ignore: cast_nullable_to_non_nullable
as Address,points: null == points ? _self.points : points // ignore: cast_nullable_to_non_nullable
as int,birthDate: freezed == birthDate ? _self.birthDate : birthDate // ignore: cast_nullable_to_non_nullable
as DateTime?,createDate: freezed == createDate ? _self.createDate : createDate // ignore: cast_nullable_to_non_nullable
as DateTime?,signUpDate: freezed == signUpDate ? _self.signUpDate : signUpDate // ignore: cast_nullable_to_non_nullable
as DateTime?,
));
}
/// Create a copy of User
/// with the given fields replaced by the non-null parameter values.
@override
@pragma('vm:prefer-inline')
$AddressCopyWith<$Res> get address {
return $AddressCopyWith<$Res>(_self.address, (value) {
return _then(_self.copyWith(address: value));
});
}
}
/// 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 userId, String hmsId, String firstName, String lastName, String phoneNumber, String email, String shopperReference, String gender, String companyId, String companyName, String symplifyId, String signUpCampaign, String signUpSource, String locale, String nationality, bool emailVerified, bool isClubMember, bool wasRecentlyCreated, Address address, int points, DateTime? birthDate, DateTime? createDate, DateTime? signUpDate)? $default,{required TResult orElse(),}) {final _that = this;
switch (_that) {
case _User() when $default != null:
return $default(_that.userId,_that.hmsId,_that.firstName,_that.lastName,_that.phoneNumber,_that.email,_that.shopperReference,_that.gender,_that.companyId,_that.companyName,_that.symplifyId,_that.signUpCampaign,_that.signUpSource,_that.locale,_that.nationality,_that.emailVerified,_that.isClubMember,_that.wasRecentlyCreated,_that.address,_that.points,_that.birthDate,_that.createDate,_that.signUpDate);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 userId, String hmsId, String firstName, String lastName, String phoneNumber, String email, String shopperReference, String gender, String companyId, String companyName, String symplifyId, String signUpCampaign, String signUpSource, String locale, String nationality, bool emailVerified, bool isClubMember, bool wasRecentlyCreated, Address address, int points, DateTime? birthDate, DateTime? createDate, DateTime? signUpDate) $default,) {final _that = this;
switch (_that) {
case _User():
return $default(_that.userId,_that.hmsId,_that.firstName,_that.lastName,_that.phoneNumber,_that.email,_that.shopperReference,_that.gender,_that.companyId,_that.companyName,_that.symplifyId,_that.signUpCampaign,_that.signUpSource,_that.locale,_that.nationality,_that.emailVerified,_that.isClubMember,_that.wasRecentlyCreated,_that.address,_that.points,_that.birthDate,_that.createDate,_that.signUpDate);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 userId, String hmsId, String firstName, String lastName, String phoneNumber, String email, String shopperReference, String gender, String companyId, String companyName, String symplifyId, String signUpCampaign, String signUpSource, String locale, String nationality, bool emailVerified, bool isClubMember, bool wasRecentlyCreated, Address address, int points, DateTime? birthDate, DateTime? createDate, DateTime? signUpDate)? $default,) {final _that = this;
switch (_that) {
case _User() when $default != null:
return $default(_that.userId,_that.hmsId,_that.firstName,_that.lastName,_that.phoneNumber,_that.email,_that.shopperReference,_that.gender,_that.companyId,_that.companyName,_that.symplifyId,_that.signUpCampaign,_that.signUpSource,_that.locale,_that.nationality,_that.emailVerified,_that.isClubMember,_that.wasRecentlyCreated,_that.address,_that.points,_that.birthDate,_that.createDate,_that.signUpDate);case _:
return null;
}
}
}
/// @nodoc
class _User implements User {
const _User({this.userId = "", this.hmsId = "", this.firstName = "", this.lastName = "", this.phoneNumber = "", this.email = "", this.shopperReference = "", this.gender = "", this.companyId = "", this.companyName = "", this.symplifyId = "", this.signUpCampaign = "", this.signUpSource = "", this.locale = "", this.nationality = "", this.emailVerified = false, this.isClubMember = false, this.wasRecentlyCreated = false, this.address = const Address(), this.points = 0, this.birthDate, this.createDate, this.signUpDate});
@override@JsonKey() final String userId;
@override@JsonKey() final String hmsId;
@override@JsonKey() final String firstName;
@override@JsonKey() final String lastName;
@override@JsonKey() final String phoneNumber;
@override@JsonKey() final String email;
@override@JsonKey() final String shopperReference;
@override@JsonKey() final String gender;
@override@JsonKey() final String companyId;
@override@JsonKey() final String companyName;
@override@JsonKey() final String symplifyId;
@override@JsonKey() final String signUpCampaign;
@override@JsonKey() final String signUpSource;
@override@JsonKey() final String locale;
@override@JsonKey() final String nationality;
@override@JsonKey() final bool emailVerified;
@override@JsonKey() final bool isClubMember;
@override@JsonKey() final bool wasRecentlyCreated;
@override@JsonKey() final Address address;
@override@JsonKey() final int points;
@override final DateTime? birthDate;
@override final DateTime? createDate;
@override final DateTime? signUpDate;
/// 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
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is _User&&(identical(other.userId, userId) || other.userId == userId)&&(identical(other.hmsId, hmsId) || other.hmsId == hmsId)&&(identical(other.firstName, firstName) || other.firstName == firstName)&&(identical(other.lastName, lastName) || other.lastName == lastName)&&(identical(other.phoneNumber, phoneNumber) || other.phoneNumber == phoneNumber)&&(identical(other.email, email) || other.email == email)&&(identical(other.shopperReference, shopperReference) || other.shopperReference == shopperReference)&&(identical(other.gender, gender) || other.gender == gender)&&(identical(other.companyId, companyId) || other.companyId == companyId)&&(identical(other.companyName, companyName) || other.companyName == companyName)&&(identical(other.symplifyId, symplifyId) || other.symplifyId == symplifyId)&&(identical(other.signUpCampaign, signUpCampaign) || other.signUpCampaign == signUpCampaign)&&(identical(other.signUpSource, signUpSource) || other.signUpSource == signUpSource)&&(identical(other.locale, locale) || other.locale == locale)&&(identical(other.nationality, nationality) || other.nationality == nationality)&&(identical(other.emailVerified, emailVerified) || other.emailVerified == emailVerified)&&(identical(other.isClubMember, isClubMember) || other.isClubMember == isClubMember)&&(identical(other.wasRecentlyCreated, wasRecentlyCreated) || other.wasRecentlyCreated == wasRecentlyCreated)&&(identical(other.address, address) || other.address == address)&&(identical(other.points, points) || other.points == points)&&(identical(other.birthDate, birthDate) || other.birthDate == birthDate)&&(identical(other.createDate, createDate) || other.createDate == createDate)&&(identical(other.signUpDate, signUpDate) || other.signUpDate == signUpDate));
}
@override
int get hashCode => Object.hashAll([runtimeType,userId,hmsId,firstName,lastName,phoneNumber,email,shopperReference,gender,companyId,companyName,symplifyId,signUpCampaign,signUpSource,locale,nationality,emailVerified,isClubMember,wasRecentlyCreated,address,points,birthDate,createDate,signUpDate]);
@override
String toString() {
return 'User(userId: $userId, hmsId: $hmsId, firstName: $firstName, lastName: $lastName, phoneNumber: $phoneNumber, email: $email, shopperReference: $shopperReference, gender: $gender, companyId: $companyId, companyName: $companyName, symplifyId: $symplifyId, signUpCampaign: $signUpCampaign, signUpSource: $signUpSource, locale: $locale, nationality: $nationality, emailVerified: $emailVerified, isClubMember: $isClubMember, wasRecentlyCreated: $wasRecentlyCreated, address: $address, points: $points, birthDate: $birthDate, createDate: $createDate, signUpDate: $signUpDate)';
}
}
/// @nodoc
abstract mixin class _$UserCopyWith<$Res> implements $UserCopyWith<$Res> {
factory _$UserCopyWith(_User value, $Res Function(_User) _then) = __$UserCopyWithImpl;
@override @useResult
$Res call({
String userId, String hmsId, String firstName, String lastName, String phoneNumber, String email, String shopperReference, String gender, String companyId, String companyName, String symplifyId, String signUpCampaign, String signUpSource, String locale, String nationality, bool emailVerified, bool isClubMember, bool wasRecentlyCreated, Address address, int points, DateTime? birthDate, DateTime? createDate, DateTime? signUpDate
});
@override $AddressCopyWith<$Res> get address;
}
/// @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? userId = null,Object? hmsId = null,Object? firstName = null,Object? lastName = null,Object? phoneNumber = null,Object? email = null,Object? shopperReference = null,Object? gender = null,Object? companyId = null,Object? companyName = null,Object? symplifyId = null,Object? signUpCampaign = null,Object? signUpSource = null,Object? locale = null,Object? nationality = null,Object? emailVerified = null,Object? isClubMember = null,Object? wasRecentlyCreated = null,Object? address = null,Object? points = null,Object? birthDate = freezed,Object? createDate = freezed,Object? signUpDate = freezed,}) {
return _then(_User(
userId: null == userId ? _self.userId : userId // ignore: cast_nullable_to_non_nullable
as String,hmsId: null == hmsId ? _self.hmsId : hmsId // ignore: cast_nullable_to_non_nullable
as String,firstName: null == firstName ? _self.firstName : firstName // ignore: cast_nullable_to_non_nullable
as String,lastName: null == lastName ? _self.lastName : lastName // ignore: cast_nullable_to_non_nullable
as String,phoneNumber: null == phoneNumber ? _self.phoneNumber : phoneNumber // ignore: cast_nullable_to_non_nullable
as String,email: null == email ? _self.email : email // ignore: cast_nullable_to_non_nullable
as String,shopperReference: null == shopperReference ? _self.shopperReference : shopperReference // ignore: cast_nullable_to_non_nullable
as String,gender: null == gender ? _self.gender : gender // ignore: cast_nullable_to_non_nullable
as String,companyId: null == companyId ? _self.companyId : companyId // ignore: cast_nullable_to_non_nullable
as String,companyName: null == companyName ? _self.companyName : companyName // ignore: cast_nullable_to_non_nullable
as String,symplifyId: null == symplifyId ? _self.symplifyId : symplifyId // ignore: cast_nullable_to_non_nullable
as String,signUpCampaign: null == signUpCampaign ? _self.signUpCampaign : signUpCampaign // ignore: cast_nullable_to_non_nullable
as String,signUpSource: null == signUpSource ? _self.signUpSource : signUpSource // ignore: cast_nullable_to_non_nullable
as String,locale: null == locale ? _self.locale : locale // ignore: cast_nullable_to_non_nullable
as String,nationality: null == nationality ? _self.nationality : nationality // ignore: cast_nullable_to_non_nullable
as String,emailVerified: null == emailVerified ? _self.emailVerified : emailVerified // ignore: cast_nullable_to_non_nullable
as bool,isClubMember: null == isClubMember ? _self.isClubMember : isClubMember // ignore: cast_nullable_to_non_nullable
as bool,wasRecentlyCreated: null == wasRecentlyCreated ? _self.wasRecentlyCreated : wasRecentlyCreated // ignore: cast_nullable_to_non_nullable
as bool,address: null == address ? _self.address : address // ignore: cast_nullable_to_non_nullable
as Address,points: null == points ? _self.points : points // ignore: cast_nullable_to_non_nullable
as int,birthDate: freezed == birthDate ? _self.birthDate : birthDate // ignore: cast_nullable_to_non_nullable
as DateTime?,createDate: freezed == createDate ? _self.createDate : createDate // ignore: cast_nullable_to_non_nullable
as DateTime?,signUpDate: freezed == signUpDate ? _self.signUpDate : signUpDate // ignore: cast_nullable_to_non_nullable
as DateTime?,
));
}
/// Create a copy of User
/// with the given fields replaced by the non-null parameter values.
@override
@pragma('vm:prefer-inline')
$AddressCopyWith<$Res> get address {
return $AddressCopyWith<$Res>(_self.address, (value) {
return _then(_self.copyWith(address: value));
});
}
}
// dart format on