diff --git a/assets/vec/bg_auth.svg.vec b/assets/vec/bg_auth.svg.vec new file mode 100644 index 0000000..a5c1c29 Binary files /dev/null and b/assets/vec/bg_auth.svg.vec differ diff --git a/packages/inspection/lib/data/model/response/poultry_location/poultry_location_model.freezed.dart b/packages/inspection/lib/data/model/response/poultry_location/poultry_location_model.freezed.dart new file mode 100644 index 0000000..b1e11e1 --- /dev/null +++ b/packages/inspection/lib/data/model/response/poultry_location/poultry_location_model.freezed.dart @@ -0,0 +1,1451 @@ +// 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 'poultry_location_model.dart'; + +// ************************************************************************** +// FreezedGenerator +// ************************************************************************** + +// dart format off +T _$identity(T value) => value; + +/// @nodoc +mixin _$PoultryLocationModel { + + int? get id; String? get unitName;@JsonKey(name: 'Lat') double? get lat;@JsonKey(name: 'Long') double? get long; User? get user; List? get hatching; Address? get address; +/// Create a copy of PoultryLocationModel +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$PoultryLocationModelCopyWith get copyWith => _$PoultryLocationModelCopyWithImpl(this as PoultryLocationModel, _$identity); + + /// Serializes this PoultryLocationModel to a JSON map. + Map toJson(); + + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is PoultryLocationModel&&(identical(other.id, id) || other.id == id)&&(identical(other.unitName, unitName) || other.unitName == unitName)&&(identical(other.lat, lat) || other.lat == lat)&&(identical(other.long, long) || other.long == long)&&(identical(other.user, user) || other.user == user)&&const DeepCollectionEquality().equals(other.hatching, hatching)&&(identical(other.address, address) || other.address == address)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,id,unitName,lat,long,user,const DeepCollectionEquality().hash(hatching),address); + +@override +String toString() { + return 'PoultryLocationModel(id: $id, unitName: $unitName, lat: $lat, long: $long, user: $user, hatching: $hatching, address: $address)'; +} + + +} + +/// @nodoc +abstract mixin class $PoultryLocationModelCopyWith<$Res> { + factory $PoultryLocationModelCopyWith(PoultryLocationModel value, $Res Function(PoultryLocationModel) _then) = _$PoultryLocationModelCopyWithImpl; +@useResult +$Res call({ + int? id, String? unitName,@JsonKey(name: 'Lat') double? lat,@JsonKey(name: 'Long') double? long, User? user, List? hatching, Address? address +}); + + +$UserCopyWith<$Res>? get user;$AddressCopyWith<$Res>? get address; + +} +/// @nodoc +class _$PoultryLocationModelCopyWithImpl<$Res> + implements $PoultryLocationModelCopyWith<$Res> { + _$PoultryLocationModelCopyWithImpl(this._self, this._then); + + final PoultryLocationModel _self; + final $Res Function(PoultryLocationModel) _then; + +/// Create a copy of PoultryLocationModel +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? id = freezed,Object? unitName = freezed,Object? lat = freezed,Object? long = freezed,Object? user = freezed,Object? hatching = freezed,Object? address = freezed,}) { + return _then(_self.copyWith( +id: freezed == id ? _self.id : id // ignore: cast_nullable_to_non_nullable +as int?,unitName: freezed == unitName ? _self.unitName : unitName // ignore: cast_nullable_to_non_nullable +as String?,lat: freezed == lat ? _self.lat : lat // ignore: cast_nullable_to_non_nullable +as double?,long: freezed == long ? _self.long : long // ignore: cast_nullable_to_non_nullable +as double?,user: freezed == user ? _self.user : user // ignore: cast_nullable_to_non_nullable +as User?,hatching: freezed == hatching ? _self.hatching : hatching // ignore: cast_nullable_to_non_nullable +as List?,address: freezed == address ? _self.address : address // ignore: cast_nullable_to_non_nullable +as Address?, + )); +} +/// Create a copy of PoultryLocationModel +/// 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 PoultryLocationModel +/// 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)); + }); +} +} + + +/// Adds pattern-matching-related methods to [PoultryLocationModel]. +extension PoultryLocationModelPatterns on PoultryLocationModel { +/// 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 Function( _PoultryLocationModel value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _PoultryLocationModel() 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 Function( _PoultryLocationModel value) $default,){ +final _that = this; +switch (_that) { +case _PoultryLocationModel(): +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? Function( _PoultryLocationModel value)? $default,){ +final _that = this; +switch (_that) { +case _PoultryLocationModel() 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 Function( int? id, String? unitName, @JsonKey(name: 'Lat') double? lat, @JsonKey(name: 'Long') double? long, User? user, List? hatching, Address? address)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _PoultryLocationModel() when $default != null: +return $default(_that.id,_that.unitName,_that.lat,_that.long,_that.user,_that.hatching,_that.address);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 Function( int? id, String? unitName, @JsonKey(name: 'Lat') double? lat, @JsonKey(name: 'Long') double? long, User? user, List? hatching, Address? address) $default,) {final _that = this; +switch (_that) { +case _PoultryLocationModel(): +return $default(_that.id,_that.unitName,_that.lat,_that.long,_that.user,_that.hatching,_that.address);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? Function( int? id, String? unitName, @JsonKey(name: 'Lat') double? lat, @JsonKey(name: 'Long') double? long, User? user, List? hatching, Address? address)? $default,) {final _that = this; +switch (_that) { +case _PoultryLocationModel() when $default != null: +return $default(_that.id,_that.unitName,_that.lat,_that.long,_that.user,_that.hatching,_that.address);case _: + return null; + +} +} + +} + +/// @nodoc +@JsonSerializable() + +class _PoultryLocationModel implements PoultryLocationModel { + const _PoultryLocationModel({this.id, this.unitName, @JsonKey(name: 'Lat') this.lat, @JsonKey(name: 'Long') this.long, this.user, final List? hatching, this.address}): _hatching = hatching; + factory _PoultryLocationModel.fromJson(Map json) => _$PoultryLocationModelFromJson(json); + +@override final int? id; +@override final String? unitName; +@override@JsonKey(name: 'Lat') final double? lat; +@override@JsonKey(name: 'Long') final double? long; +@override final User? user; + final List? _hatching; +@override List? get hatching { + final value = _hatching; + if (value == null) return null; + if (_hatching is EqualUnmodifiableListView) return _hatching; + // ignore: implicit_dynamic_type + return EqualUnmodifiableListView(value); +} + +@override final Address? address; + +/// Create a copy of PoultryLocationModel +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$PoultryLocationModelCopyWith<_PoultryLocationModel> get copyWith => __$PoultryLocationModelCopyWithImpl<_PoultryLocationModel>(this, _$identity); + +@override +Map toJson() { + return _$PoultryLocationModelToJson(this, ); +} + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _PoultryLocationModel&&(identical(other.id, id) || other.id == id)&&(identical(other.unitName, unitName) || other.unitName == unitName)&&(identical(other.lat, lat) || other.lat == lat)&&(identical(other.long, long) || other.long == long)&&(identical(other.user, user) || other.user == user)&&const DeepCollectionEquality().equals(other._hatching, _hatching)&&(identical(other.address, address) || other.address == address)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,id,unitName,lat,long,user,const DeepCollectionEquality().hash(_hatching),address); + +@override +String toString() { + return 'PoultryLocationModel(id: $id, unitName: $unitName, lat: $lat, long: $long, user: $user, hatching: $hatching, address: $address)'; +} + + +} + +/// @nodoc +abstract mixin class _$PoultryLocationModelCopyWith<$Res> implements $PoultryLocationModelCopyWith<$Res> { + factory _$PoultryLocationModelCopyWith(_PoultryLocationModel value, $Res Function(_PoultryLocationModel) _then) = __$PoultryLocationModelCopyWithImpl; +@override @useResult +$Res call({ + int? id, String? unitName,@JsonKey(name: 'Lat') double? lat,@JsonKey(name: 'Long') double? long, User? user, List? hatching, Address? address +}); + + +@override $UserCopyWith<$Res>? get user;@override $AddressCopyWith<$Res>? get address; + +} +/// @nodoc +class __$PoultryLocationModelCopyWithImpl<$Res> + implements _$PoultryLocationModelCopyWith<$Res> { + __$PoultryLocationModelCopyWithImpl(this._self, this._then); + + final _PoultryLocationModel _self; + final $Res Function(_PoultryLocationModel) _then; + +/// Create a copy of PoultryLocationModel +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? id = freezed,Object? unitName = freezed,Object? lat = freezed,Object? long = freezed,Object? user = freezed,Object? hatching = freezed,Object? address = freezed,}) { + return _then(_PoultryLocationModel( +id: freezed == id ? _self.id : id // ignore: cast_nullable_to_non_nullable +as int?,unitName: freezed == unitName ? _self.unitName : unitName // ignore: cast_nullable_to_non_nullable +as String?,lat: freezed == lat ? _self.lat : lat // ignore: cast_nullable_to_non_nullable +as double?,long: freezed == long ? _self.long : long // ignore: cast_nullable_to_non_nullable +as double?,user: freezed == user ? _self.user : user // ignore: cast_nullable_to_non_nullable +as User?,hatching: freezed == hatching ? _self._hatching : hatching // ignore: cast_nullable_to_non_nullable +as List?,address: freezed == address ? _self.address : address // ignore: cast_nullable_to_non_nullable +as Address?, + )); +} + +/// Create a copy of PoultryLocationModel +/// 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 PoultryLocationModel +/// 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)); + }); +} +} + + +/// @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 get copyWith => _$UserCopyWithImpl(this as User, _$identity); + + /// Serializes this User to a JSON map. + Map 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 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 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? 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 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 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? 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 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 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 _$Hatching { + + int? get quantity; int? get leftOver; int? get period; int? get chickenAge; DateTime? get date; bool? get violation; bool? get archive; +/// Create a copy of Hatching +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$HatchingCopyWith get copyWith => _$HatchingCopyWithImpl(this as Hatching, _$identity); + + /// Serializes this Hatching to a JSON map. + Map toJson(); + + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is Hatching&&(identical(other.quantity, quantity) || other.quantity == quantity)&&(identical(other.leftOver, leftOver) || other.leftOver == leftOver)&&(identical(other.period, period) || other.period == period)&&(identical(other.chickenAge, chickenAge) || other.chickenAge == chickenAge)&&(identical(other.date, date) || other.date == date)&&(identical(other.violation, violation) || other.violation == violation)&&(identical(other.archive, archive) || other.archive == archive)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,quantity,leftOver,period,chickenAge,date,violation,archive); + +@override +String toString() { + return 'Hatching(quantity: $quantity, leftOver: $leftOver, period: $period, chickenAge: $chickenAge, date: $date, violation: $violation, archive: $archive)'; +} + + +} + +/// @nodoc +abstract mixin class $HatchingCopyWith<$Res> { + factory $HatchingCopyWith(Hatching value, $Res Function(Hatching) _then) = _$HatchingCopyWithImpl; +@useResult +$Res call({ + int? quantity, int? leftOver, int? period, int? chickenAge, DateTime? date, bool? violation, bool? archive +}); + + + + +} +/// @nodoc +class _$HatchingCopyWithImpl<$Res> + implements $HatchingCopyWith<$Res> { + _$HatchingCopyWithImpl(this._self, this._then); + + final Hatching _self; + final $Res Function(Hatching) _then; + +/// Create a copy of Hatching +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? quantity = freezed,Object? leftOver = freezed,Object? period = freezed,Object? chickenAge = freezed,Object? date = freezed,Object? violation = freezed,Object? archive = freezed,}) { + return _then(_self.copyWith( +quantity: freezed == quantity ? _self.quantity : quantity // ignore: cast_nullable_to_non_nullable +as int?,leftOver: freezed == leftOver ? _self.leftOver : leftOver // ignore: cast_nullable_to_non_nullable +as int?,period: freezed == period ? _self.period : period // ignore: cast_nullable_to_non_nullable +as int?,chickenAge: freezed == chickenAge ? _self.chickenAge : chickenAge // ignore: cast_nullable_to_non_nullable +as int?,date: freezed == date ? _self.date : date // ignore: cast_nullable_to_non_nullable +as DateTime?,violation: freezed == violation ? _self.violation : violation // ignore: cast_nullable_to_non_nullable +as bool?,archive: freezed == archive ? _self.archive : archive // ignore: cast_nullable_to_non_nullable +as bool?, + )); +} + +} + + +/// Adds pattern-matching-related methods to [Hatching]. +extension HatchingPatterns on Hatching { +/// 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 Function( _Hatching value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _Hatching() 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 Function( _Hatching value) $default,){ +final _that = this; +switch (_that) { +case _Hatching(): +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? Function( _Hatching value)? $default,){ +final _that = this; +switch (_that) { +case _Hatching() 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 Function( int? quantity, int? leftOver, int? period, int? chickenAge, DateTime? date, bool? violation, bool? archive)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _Hatching() when $default != null: +return $default(_that.quantity,_that.leftOver,_that.period,_that.chickenAge,_that.date,_that.violation,_that.archive);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 Function( int? quantity, int? leftOver, int? period, int? chickenAge, DateTime? date, bool? violation, bool? archive) $default,) {final _that = this; +switch (_that) { +case _Hatching(): +return $default(_that.quantity,_that.leftOver,_that.period,_that.chickenAge,_that.date,_that.violation,_that.archive);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? Function( int? quantity, int? leftOver, int? period, int? chickenAge, DateTime? date, bool? violation, bool? archive)? $default,) {final _that = this; +switch (_that) { +case _Hatching() when $default != null: +return $default(_that.quantity,_that.leftOver,_that.period,_that.chickenAge,_that.date,_that.violation,_that.archive);case _: + return null; + +} +} + +} + +/// @nodoc +@JsonSerializable() + +class _Hatching implements Hatching { + const _Hatching({this.quantity, this.leftOver, this.period, this.chickenAge, this.date, this.violation, this.archive}); + factory _Hatching.fromJson(Map json) => _$HatchingFromJson(json); + +@override final int? quantity; +@override final int? leftOver; +@override final int? period; +@override final int? chickenAge; +@override final DateTime? date; +@override final bool? violation; +@override final bool? archive; + +/// Create a copy of Hatching +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$HatchingCopyWith<_Hatching> get copyWith => __$HatchingCopyWithImpl<_Hatching>(this, _$identity); + +@override +Map toJson() { + return _$HatchingToJson(this, ); +} + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _Hatching&&(identical(other.quantity, quantity) || other.quantity == quantity)&&(identical(other.leftOver, leftOver) || other.leftOver == leftOver)&&(identical(other.period, period) || other.period == period)&&(identical(other.chickenAge, chickenAge) || other.chickenAge == chickenAge)&&(identical(other.date, date) || other.date == date)&&(identical(other.violation, violation) || other.violation == violation)&&(identical(other.archive, archive) || other.archive == archive)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,quantity,leftOver,period,chickenAge,date,violation,archive); + +@override +String toString() { + return 'Hatching(quantity: $quantity, leftOver: $leftOver, period: $period, chickenAge: $chickenAge, date: $date, violation: $violation, archive: $archive)'; +} + + +} + +/// @nodoc +abstract mixin class _$HatchingCopyWith<$Res> implements $HatchingCopyWith<$Res> { + factory _$HatchingCopyWith(_Hatching value, $Res Function(_Hatching) _then) = __$HatchingCopyWithImpl; +@override @useResult +$Res call({ + int? quantity, int? leftOver, int? period, int? chickenAge, DateTime? date, bool? violation, bool? archive +}); + + + + +} +/// @nodoc +class __$HatchingCopyWithImpl<$Res> + implements _$HatchingCopyWith<$Res> { + __$HatchingCopyWithImpl(this._self, this._then); + + final _Hatching _self; + final $Res Function(_Hatching) _then; + +/// Create a copy of Hatching +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? quantity = freezed,Object? leftOver = freezed,Object? period = freezed,Object? chickenAge = freezed,Object? date = freezed,Object? violation = freezed,Object? archive = freezed,}) { + return _then(_Hatching( +quantity: freezed == quantity ? _self.quantity : quantity // ignore: cast_nullable_to_non_nullable +as int?,leftOver: freezed == leftOver ? _self.leftOver : leftOver // ignore: cast_nullable_to_non_nullable +as int?,period: freezed == period ? _self.period : period // ignore: cast_nullable_to_non_nullable +as int?,chickenAge: freezed == chickenAge ? _self.chickenAge : chickenAge // ignore: cast_nullable_to_non_nullable +as int?,date: freezed == date ? _self.date : date // ignore: cast_nullable_to_non_nullable +as DateTime?,violation: freezed == violation ? _self.violation : violation // ignore: cast_nullable_to_non_nullable +as bool?,archive: freezed == archive ? _self.archive : archive // ignore: cast_nullable_to_non_nullable +as bool?, + )); +} + + +} + + +/// @nodoc +mixin _$Address { + + City? get city; String? get address; +/// 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
get copyWith => _$AddressCopyWithImpl
(this as Address, _$identity); + + /// Serializes this Address to a JSON map. + Map toJson(); + + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is Address&&(identical(other.city, city) || other.city == city)&&(identical(other.address, address) || other.address == address)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,city,address); + +@override +String toString() { + return 'Address(city: $city, address: $address)'; +} + + +} + +/// @nodoc +abstract mixin class $AddressCopyWith<$Res> { + factory $AddressCopyWith(Address value, $Res Function(Address) _then) = _$AddressCopyWithImpl; +@useResult +$Res call({ + City? city, String? address +}); + + +$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,Object? address = freezed,}) { + return _then(_self.copyWith( +city: freezed == city ? _self.city : city // ignore: cast_nullable_to_non_nullable +as City?,address: freezed == address ? _self.address : address // ignore: cast_nullable_to_non_nullable +as String?, + )); +} +/// 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 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 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? 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 Function( City? city, String? address)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _Address() when $default != null: +return $default(_that.city,_that.address);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 Function( City? city, String? address) $default,) {final _that = this; +switch (_that) { +case _Address(): +return $default(_that.city,_that.address);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? Function( City? city, String? address)? $default,) {final _that = this; +switch (_that) { +case _Address() when $default != null: +return $default(_that.city,_that.address);case _: + return null; + +} +} + +} + +/// @nodoc +@JsonSerializable() + +class _Address implements Address { + const _Address({this.city, this.address}); + factory _Address.fromJson(Map json) => _$AddressFromJson(json); + +@override final City? city; +@override final String? address; + +/// 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 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)&&(identical(other.address, address) || other.address == address)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,city,address); + +@override +String toString() { + return 'Address(city: $city, address: $address)'; +} + + +} + +/// @nodoc +abstract mixin class _$AddressCopyWith<$Res> implements $AddressCopyWith<$Res> { + factory _$AddressCopyWith(_Address value, $Res Function(_Address) _then) = __$AddressCopyWithImpl; +@override @useResult +$Res call({ + City? city, String? address +}); + + +@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,Object? address = freezed,}) { + return _then(_Address( +city: freezed == city ? _self.city : city // ignore: cast_nullable_to_non_nullable +as City?,address: freezed == address ? _self.address : address // ignore: cast_nullable_to_non_nullable +as String?, + )); +} + +/// 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 get copyWith => _$CityCopyWithImpl(this as City, _$identity); + + /// Serializes this City to a JSON map. + Map 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 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 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? 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 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 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? 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 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 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?, + )); +} + + +} + +// dart format on diff --git a/packages/inspection/lib/data/model/response/poultry_location/poultry_location_model.g.dart b/packages/inspection/lib/data/model/response/poultry_location/poultry_location_model.g.dart new file mode 100644 index 0000000..653680a --- /dev/null +++ b/packages/inspection/lib/data/model/response/poultry_location/poultry_location_model.g.dart @@ -0,0 +1,86 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'poultry_location_model.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +_PoultryLocationModel _$PoultryLocationModelFromJson( + Map json, +) => _PoultryLocationModel( + id: (json['id'] as num?)?.toInt(), + unitName: json['unit_name'] as String?, + lat: (json['Lat'] as num?)?.toDouble(), + long: (json['Long'] as num?)?.toDouble(), + user: json['user'] == null + ? null + : User.fromJson(json['user'] as Map), + hatching: (json['hatching'] as List?) + ?.map((e) => Hatching.fromJson(e as Map)) + .toList(), + address: json['address'] == null + ? null + : Address.fromJson(json['address'] as Map), +); + +Map _$PoultryLocationModelToJson( + _PoultryLocationModel instance, +) => { + 'id': instance.id, + 'unit_name': instance.unitName, + 'Lat': instance.lat, + 'Long': instance.long, + 'user': instance.user, + 'hatching': instance.hatching, + 'address': instance.address, +}; + +_User _$UserFromJson(Map json) => _User( + fullname: json['fullname'] as String?, + mobile: json['mobile'] as String?, +); + +Map _$UserToJson(_User instance) => { + 'fullname': instance.fullname, + 'mobile': instance.mobile, +}; + +_Hatching _$HatchingFromJson(Map json) => _Hatching( + quantity: (json['quantity'] as num?)?.toInt(), + leftOver: (json['left_over'] as num?)?.toInt(), + period: (json['period'] as num?)?.toInt(), + chickenAge: (json['chicken_age'] as num?)?.toInt(), + date: json['date'] == null ? null : DateTime.parse(json['date'] as String), + violation: json['violation'] as bool?, + archive: json['archive'] as bool?, +); + +Map _$HatchingToJson(_Hatching instance) => { + 'quantity': instance.quantity, + 'left_over': instance.leftOver, + 'period': instance.period, + 'chicken_age': instance.chickenAge, + 'date': instance.date?.toIso8601String(), + 'violation': instance.violation, + 'archive': instance.archive, +}; + +_Address _$AddressFromJson(Map json) => _Address( + city: json['city'] == null + ? null + : City.fromJson(json['city'] as Map), + address: json['address'] as String?, +); + +Map _$AddressToJson(_Address instance) => { + 'city': instance.city, + 'address': instance.address, +}; + +_City _$CityFromJson(Map json) => + _City(name: json['name'] as String?); + +Map _$CityToJson(_City instance) => { + 'name': instance.name, +}; diff --git a/packages/inspection/lib/data/model/response/user_profile/user_profile_model.freezed.dart b/packages/inspection/lib/data/model/response/user_profile/user_profile_model.freezed.dart new file mode 100644 index 0000000..2e3865e --- /dev/null +++ b/packages/inspection/lib/data/model/response/user_profile/user_profile_model.freezed.dart @@ -0,0 +1,1479 @@ +// 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 'user_profile_model.dart'; + +// ************************************************************************** +// FreezedGenerator +// ************************************************************************** + +// dart format off +T _$identity(T value) => value; + +/// @nodoc +mixin _$UserProfileModel { + + User get user; Role get role; List get permissions; +/// Create a copy of UserProfileModel +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$UserProfileModelCopyWith get copyWith => _$UserProfileModelCopyWithImpl(this as UserProfileModel, _$identity); + + /// Serializes this UserProfileModel to a JSON map. + Map toJson(); + + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is UserProfileModel&&(identical(other.user, user) || other.user == user)&&(identical(other.role, role) || other.role == role)&&const DeepCollectionEquality().equals(other.permissions, permissions)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,user,role,const DeepCollectionEquality().hash(permissions)); + +@override +String toString() { + return 'UserProfileModel(user: $user, role: $role, permissions: $permissions)'; +} + + +} + +/// @nodoc +abstract mixin class $UserProfileModelCopyWith<$Res> { + factory $UserProfileModelCopyWith(UserProfileModel value, $Res Function(UserProfileModel) _then) = _$UserProfileModelCopyWithImpl; +@useResult +$Res call({ + User user, Role role, List permissions +}); + + +$UserCopyWith<$Res> get user;$RoleCopyWith<$Res> get role; + +} +/// @nodoc +class _$UserProfileModelCopyWithImpl<$Res> + implements $UserProfileModelCopyWith<$Res> { + _$UserProfileModelCopyWithImpl(this._self, this._then); + + final UserProfileModel _self; + final $Res Function(UserProfileModel) _then; + +/// Create a copy of UserProfileModel +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? user = null,Object? role = null,Object? permissions = null,}) { + return _then(_self.copyWith( +user: null == user ? _self.user : user // ignore: cast_nullable_to_non_nullable +as User,role: null == role ? _self.role : role // ignore: cast_nullable_to_non_nullable +as Role,permissions: null == permissions ? _self.permissions : permissions // ignore: cast_nullable_to_non_nullable +as List, + )); +} +/// Create a copy of UserProfileModel +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$UserCopyWith<$Res> get user { + + return $UserCopyWith<$Res>(_self.user, (value) { + return _then(_self.copyWith(user: value)); + }); +}/// Create a copy of UserProfileModel +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$RoleCopyWith<$Res> get role { + + return $RoleCopyWith<$Res>(_self.role, (value) { + return _then(_self.copyWith(role: value)); + }); +} +} + + +/// Adds pattern-matching-related methods to [UserProfileModel]. +extension UserProfileModelPatterns on UserProfileModel { +/// 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 Function( _UserProfileModel value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _UserProfileModel() 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 Function( _UserProfileModel value) $default,){ +final _that = this; +switch (_that) { +case _UserProfileModel(): +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? Function( _UserProfileModel value)? $default,){ +final _that = this; +switch (_that) { +case _UserProfileModel() 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 Function( User user, Role role, List permissions)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _UserProfileModel() when $default != null: +return $default(_that.user,_that.role,_that.permissions);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 Function( User user, Role role, List permissions) $default,) {final _that = this; +switch (_that) { +case _UserProfileModel(): +return $default(_that.user,_that.role,_that.permissions);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? Function( User user, Role role, List permissions)? $default,) {final _that = this; +switch (_that) { +case _UserProfileModel() when $default != null: +return $default(_that.user,_that.role,_that.permissions);case _: + return null; + +} +} + +} + +/// @nodoc +@JsonSerializable() + +class _UserProfileModel implements UserProfileModel { + const _UserProfileModel({required this.user, required this.role, required final List permissions}): _permissions = permissions; + factory _UserProfileModel.fromJson(Map json) => _$UserProfileModelFromJson(json); + +@override final User user; +@override final Role role; + final List _permissions; +@override List get permissions { + if (_permissions is EqualUnmodifiableListView) return _permissions; + // ignore: implicit_dynamic_type + return EqualUnmodifiableListView(_permissions); +} + + +/// Create a copy of UserProfileModel +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$UserProfileModelCopyWith<_UserProfileModel> get copyWith => __$UserProfileModelCopyWithImpl<_UserProfileModel>(this, _$identity); + +@override +Map toJson() { + return _$UserProfileModelToJson(this, ); +} + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _UserProfileModel&&(identical(other.user, user) || other.user == user)&&(identical(other.role, role) || other.role == role)&&const DeepCollectionEquality().equals(other._permissions, _permissions)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,user,role,const DeepCollectionEquality().hash(_permissions)); + +@override +String toString() { + return 'UserProfileModel(user: $user, role: $role, permissions: $permissions)'; +} + + +} + +/// @nodoc +abstract mixin class _$UserProfileModelCopyWith<$Res> implements $UserProfileModelCopyWith<$Res> { + factory _$UserProfileModelCopyWith(_UserProfileModel value, $Res Function(_UserProfileModel) _then) = __$UserProfileModelCopyWithImpl; +@override @useResult +$Res call({ + User user, Role role, List permissions +}); + + +@override $UserCopyWith<$Res> get user;@override $RoleCopyWith<$Res> get role; + +} +/// @nodoc +class __$UserProfileModelCopyWithImpl<$Res> + implements _$UserProfileModelCopyWith<$Res> { + __$UserProfileModelCopyWithImpl(this._self, this._then); + + final _UserProfileModel _self; + final $Res Function(_UserProfileModel) _then; + +/// Create a copy of UserProfileModel +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? user = null,Object? role = null,Object? permissions = null,}) { + return _then(_UserProfileModel( +user: null == user ? _self.user : user // ignore: cast_nullable_to_non_nullable +as User,role: null == role ? _self.role : role // ignore: cast_nullable_to_non_nullable +as Role,permissions: null == permissions ? _self._permissions : permissions // ignore: cast_nullable_to_non_nullable +as List, + )); +} + +/// Create a copy of UserProfileModel +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$UserCopyWith<$Res> get user { + + return $UserCopyWith<$Res>(_self.user, (value) { + return _then(_self.copyWith(user: value)); + }); +}/// Create a copy of UserProfileModel +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$RoleCopyWith<$Res> get role { + + return $RoleCopyWith<$Res>(_self.role, (value) { + return _then(_self.copyWith(role: value)); + }); +} +} + + +/// @nodoc +mixin _$User { + + int get id; String get username; String get password; String get firstName; String get lastName; bool get isActive; String get mobile; String get phone; String get nationalCode; DateTime get birthdate; String get nationality; String get ownership; String get address; String get photo; int get province; int get city; bool get otpStatus; String get cityName; String get provinceName; +/// 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 get copyWith => _$UserCopyWithImpl(this as User, _$identity); + + /// Serializes this User to a JSON map. + Map toJson(); + + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is User&&(identical(other.id, id) || other.id == id)&&(identical(other.username, username) || other.username == username)&&(identical(other.password, password) || other.password == password)&&(identical(other.firstName, firstName) || other.firstName == firstName)&&(identical(other.lastName, lastName) || other.lastName == lastName)&&(identical(other.isActive, isActive) || other.isActive == isActive)&&(identical(other.mobile, mobile) || other.mobile == mobile)&&(identical(other.phone, phone) || other.phone == phone)&&(identical(other.nationalCode, nationalCode) || other.nationalCode == nationalCode)&&(identical(other.birthdate, birthdate) || other.birthdate == birthdate)&&(identical(other.nationality, nationality) || other.nationality == nationality)&&(identical(other.ownership, ownership) || other.ownership == ownership)&&(identical(other.address, address) || other.address == address)&&(identical(other.photo, photo) || other.photo == photo)&&(identical(other.province, province) || other.province == province)&&(identical(other.city, city) || other.city == city)&&(identical(other.otpStatus, otpStatus) || other.otpStatus == otpStatus)&&(identical(other.cityName, cityName) || other.cityName == cityName)&&(identical(other.provinceName, provinceName) || other.provinceName == provinceName)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hashAll([runtimeType,id,username,password,firstName,lastName,isActive,mobile,phone,nationalCode,birthdate,nationality,ownership,address,photo,province,city,otpStatus,cityName,provinceName]); + +@override +String toString() { + return 'User(id: $id, username: $username, password: $password, firstName: $firstName, lastName: $lastName, isActive: $isActive, mobile: $mobile, phone: $phone, nationalCode: $nationalCode, birthdate: $birthdate, nationality: $nationality, ownership: $ownership, address: $address, photo: $photo, province: $province, city: $city, otpStatus: $otpStatus, cityName: $cityName, provinceName: $provinceName)'; +} + + +} + +/// @nodoc +abstract mixin class $UserCopyWith<$Res> { + factory $UserCopyWith(User value, $Res Function(User) _then) = _$UserCopyWithImpl; +@useResult +$Res call({ + int id, String username, String password, String firstName, String lastName, bool isActive, String mobile, String phone, String nationalCode, DateTime birthdate, String nationality, String ownership, String address, String photo, int province, int city, bool otpStatus, String cityName, String provinceName +}); + + + + +} +/// @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? id = null,Object? username = null,Object? password = null,Object? firstName = null,Object? lastName = null,Object? isActive = null,Object? mobile = null,Object? phone = null,Object? nationalCode = null,Object? birthdate = null,Object? nationality = null,Object? ownership = null,Object? address = null,Object? photo = null,Object? province = null,Object? city = null,Object? otpStatus = null,Object? cityName = null,Object? provinceName = null,}) { + return _then(_self.copyWith( +id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable +as int,username: null == username ? _self.username : username // ignore: cast_nullable_to_non_nullable +as String,password: null == password ? _self.password : password // 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,isActive: null == isActive ? _self.isActive : isActive // ignore: cast_nullable_to_non_nullable +as bool,mobile: null == mobile ? _self.mobile : mobile // ignore: cast_nullable_to_non_nullable +as String,phone: null == phone ? _self.phone : phone // ignore: cast_nullable_to_non_nullable +as String,nationalCode: null == nationalCode ? _self.nationalCode : nationalCode // ignore: cast_nullable_to_non_nullable +as String,birthdate: null == birthdate ? _self.birthdate : birthdate // ignore: cast_nullable_to_non_nullable +as DateTime,nationality: null == nationality ? _self.nationality : nationality // ignore: cast_nullable_to_non_nullable +as String,ownership: null == ownership ? _self.ownership : ownership // ignore: cast_nullable_to_non_nullable +as String,address: null == address ? _self.address : address // ignore: cast_nullable_to_non_nullable +as String,photo: null == photo ? _self.photo : photo // ignore: cast_nullable_to_non_nullable +as String,province: null == province ? _self.province : province // ignore: cast_nullable_to_non_nullable +as int,city: null == city ? _self.city : city // ignore: cast_nullable_to_non_nullable +as int,otpStatus: null == otpStatus ? _self.otpStatus : otpStatus // ignore: cast_nullable_to_non_nullable +as bool,cityName: null == cityName ? _self.cityName : cityName // ignore: cast_nullable_to_non_nullable +as String,provinceName: null == provinceName ? _self.provinceName : provinceName // 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 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 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? 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 Function( int id, String username, String password, String firstName, String lastName, bool isActive, String mobile, String phone, String nationalCode, DateTime birthdate, String nationality, String ownership, String address, String photo, int province, int city, bool otpStatus, String cityName, String provinceName)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _User() when $default != null: +return $default(_that.id,_that.username,_that.password,_that.firstName,_that.lastName,_that.isActive,_that.mobile,_that.phone,_that.nationalCode,_that.birthdate,_that.nationality,_that.ownership,_that.address,_that.photo,_that.province,_that.city,_that.otpStatus,_that.cityName,_that.provinceName);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 Function( int id, String username, String password, String firstName, String lastName, bool isActive, String mobile, String phone, String nationalCode, DateTime birthdate, String nationality, String ownership, String address, String photo, int province, int city, bool otpStatus, String cityName, String provinceName) $default,) {final _that = this; +switch (_that) { +case _User(): +return $default(_that.id,_that.username,_that.password,_that.firstName,_that.lastName,_that.isActive,_that.mobile,_that.phone,_that.nationalCode,_that.birthdate,_that.nationality,_that.ownership,_that.address,_that.photo,_that.province,_that.city,_that.otpStatus,_that.cityName,_that.provinceName);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? Function( int id, String username, String password, String firstName, String lastName, bool isActive, String mobile, String phone, String nationalCode, DateTime birthdate, String nationality, String ownership, String address, String photo, int province, int city, bool otpStatus, String cityName, String provinceName)? $default,) {final _that = this; +switch (_that) { +case _User() when $default != null: +return $default(_that.id,_that.username,_that.password,_that.firstName,_that.lastName,_that.isActive,_that.mobile,_that.phone,_that.nationalCode,_that.birthdate,_that.nationality,_that.ownership,_that.address,_that.photo,_that.province,_that.city,_that.otpStatus,_that.cityName,_that.provinceName);case _: + return null; + +} +} + +} + +/// @nodoc +@JsonSerializable() + +class _User implements User { + const _User({required this.id, required this.username, required this.password, required this.firstName, required this.lastName, required this.isActive, required this.mobile, required this.phone, required this.nationalCode, required this.birthdate, required this.nationality, required this.ownership, required this.address, required this.photo, required this.province, required this.city, required this.otpStatus, required this.cityName, required this.provinceName}); + factory _User.fromJson(Map json) => _$UserFromJson(json); + +@override final int id; +@override final String username; +@override final String password; +@override final String firstName; +@override final String lastName; +@override final bool isActive; +@override final String mobile; +@override final String phone; +@override final String nationalCode; +@override final DateTime birthdate; +@override final String nationality; +@override final String ownership; +@override final String address; +@override final String photo; +@override final int province; +@override final int city; +@override final bool otpStatus; +@override final String cityName; +@override final String provinceName; + +/// 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 toJson() { + return _$UserToJson(this, ); +} + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _User&&(identical(other.id, id) || other.id == id)&&(identical(other.username, username) || other.username == username)&&(identical(other.password, password) || other.password == password)&&(identical(other.firstName, firstName) || other.firstName == firstName)&&(identical(other.lastName, lastName) || other.lastName == lastName)&&(identical(other.isActive, isActive) || other.isActive == isActive)&&(identical(other.mobile, mobile) || other.mobile == mobile)&&(identical(other.phone, phone) || other.phone == phone)&&(identical(other.nationalCode, nationalCode) || other.nationalCode == nationalCode)&&(identical(other.birthdate, birthdate) || other.birthdate == birthdate)&&(identical(other.nationality, nationality) || other.nationality == nationality)&&(identical(other.ownership, ownership) || other.ownership == ownership)&&(identical(other.address, address) || other.address == address)&&(identical(other.photo, photo) || other.photo == photo)&&(identical(other.province, province) || other.province == province)&&(identical(other.city, city) || other.city == city)&&(identical(other.otpStatus, otpStatus) || other.otpStatus == otpStatus)&&(identical(other.cityName, cityName) || other.cityName == cityName)&&(identical(other.provinceName, provinceName) || other.provinceName == provinceName)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hashAll([runtimeType,id,username,password,firstName,lastName,isActive,mobile,phone,nationalCode,birthdate,nationality,ownership,address,photo,province,city,otpStatus,cityName,provinceName]); + +@override +String toString() { + return 'User(id: $id, username: $username, password: $password, firstName: $firstName, lastName: $lastName, isActive: $isActive, mobile: $mobile, phone: $phone, nationalCode: $nationalCode, birthdate: $birthdate, nationality: $nationality, ownership: $ownership, address: $address, photo: $photo, province: $province, city: $city, otpStatus: $otpStatus, cityName: $cityName, provinceName: $provinceName)'; +} + + +} + +/// @nodoc +abstract mixin class _$UserCopyWith<$Res> implements $UserCopyWith<$Res> { + factory _$UserCopyWith(_User value, $Res Function(_User) _then) = __$UserCopyWithImpl; +@override @useResult +$Res call({ + int id, String username, String password, String firstName, String lastName, bool isActive, String mobile, String phone, String nationalCode, DateTime birthdate, String nationality, String ownership, String address, String photo, int province, int city, bool otpStatus, String cityName, String provinceName +}); + + + + +} +/// @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? id = null,Object? username = null,Object? password = null,Object? firstName = null,Object? lastName = null,Object? isActive = null,Object? mobile = null,Object? phone = null,Object? nationalCode = null,Object? birthdate = null,Object? nationality = null,Object? ownership = null,Object? address = null,Object? photo = null,Object? province = null,Object? city = null,Object? otpStatus = null,Object? cityName = null,Object? provinceName = null,}) { + return _then(_User( +id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable +as int,username: null == username ? _self.username : username // ignore: cast_nullable_to_non_nullable +as String,password: null == password ? _self.password : password // 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,isActive: null == isActive ? _self.isActive : isActive // ignore: cast_nullable_to_non_nullable +as bool,mobile: null == mobile ? _self.mobile : mobile // ignore: cast_nullable_to_non_nullable +as String,phone: null == phone ? _self.phone : phone // ignore: cast_nullable_to_non_nullable +as String,nationalCode: null == nationalCode ? _self.nationalCode : nationalCode // ignore: cast_nullable_to_non_nullable +as String,birthdate: null == birthdate ? _self.birthdate : birthdate // ignore: cast_nullable_to_non_nullable +as DateTime,nationality: null == nationality ? _self.nationality : nationality // ignore: cast_nullable_to_non_nullable +as String,ownership: null == ownership ? _self.ownership : ownership // ignore: cast_nullable_to_non_nullable +as String,address: null == address ? _self.address : address // ignore: cast_nullable_to_non_nullable +as String,photo: null == photo ? _self.photo : photo // ignore: cast_nullable_to_non_nullable +as String,province: null == province ? _self.province : province // ignore: cast_nullable_to_non_nullable +as int,city: null == city ? _self.city : city // ignore: cast_nullable_to_non_nullable +as int,otpStatus: null == otpStatus ? _self.otpStatus : otpStatus // ignore: cast_nullable_to_non_nullable +as bool,cityName: null == cityName ? _self.cityName : cityName // ignore: cast_nullable_to_non_nullable +as String,provinceName: null == provinceName ? _self.provinceName : provinceName // ignore: cast_nullable_to_non_nullable +as String, + )); +} + + +} + + +/// @nodoc +mixin _$Role { + + int get id; String get roleName; String get description; RoleType get type; List get permissions; +/// Create a copy of Role +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$RoleCopyWith get copyWith => _$RoleCopyWithImpl(this as Role, _$identity); + + /// Serializes this Role to a JSON map. + Map toJson(); + + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is Role&&(identical(other.id, id) || other.id == id)&&(identical(other.roleName, roleName) || other.roleName == roleName)&&(identical(other.description, description) || other.description == description)&&(identical(other.type, type) || other.type == type)&&const DeepCollectionEquality().equals(other.permissions, permissions)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,id,roleName,description,type,const DeepCollectionEquality().hash(permissions)); + +@override +String toString() { + return 'Role(id: $id, roleName: $roleName, description: $description, type: $type, permissions: $permissions)'; +} + + +} + +/// @nodoc +abstract mixin class $RoleCopyWith<$Res> { + factory $RoleCopyWith(Role value, $Res Function(Role) _then) = _$RoleCopyWithImpl; +@useResult +$Res call({ + int id, String roleName, String description, RoleType type, List permissions +}); + + +$RoleTypeCopyWith<$Res> get type; + +} +/// @nodoc +class _$RoleCopyWithImpl<$Res> + implements $RoleCopyWith<$Res> { + _$RoleCopyWithImpl(this._self, this._then); + + final Role _self; + final $Res Function(Role) _then; + +/// Create a copy of Role +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? id = null,Object? roleName = null,Object? description = null,Object? type = null,Object? permissions = null,}) { + return _then(_self.copyWith( +id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable +as int,roleName: null == roleName ? _self.roleName : roleName // ignore: cast_nullable_to_non_nullable +as String,description: null == description ? _self.description : description // ignore: cast_nullable_to_non_nullable +as String,type: null == type ? _self.type : type // ignore: cast_nullable_to_non_nullable +as RoleType,permissions: null == permissions ? _self.permissions : permissions // ignore: cast_nullable_to_non_nullable +as List, + )); +} +/// Create a copy of Role +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$RoleTypeCopyWith<$Res> get type { + + return $RoleTypeCopyWith<$Res>(_self.type, (value) { + return _then(_self.copyWith(type: value)); + }); +} +} + + +/// Adds pattern-matching-related methods to [Role]. +extension RolePatterns on Role { +/// 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 Function( _Role value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _Role() 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 Function( _Role value) $default,){ +final _that = this; +switch (_that) { +case _Role(): +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? Function( _Role value)? $default,){ +final _that = this; +switch (_that) { +case _Role() 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 Function( int id, String roleName, String description, RoleType type, List permissions)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _Role() when $default != null: +return $default(_that.id,_that.roleName,_that.description,_that.type,_that.permissions);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 Function( int id, String roleName, String description, RoleType type, List permissions) $default,) {final _that = this; +switch (_that) { +case _Role(): +return $default(_that.id,_that.roleName,_that.description,_that.type,_that.permissions);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? Function( int id, String roleName, String description, RoleType type, List permissions)? $default,) {final _that = this; +switch (_that) { +case _Role() when $default != null: +return $default(_that.id,_that.roleName,_that.description,_that.type,_that.permissions);case _: + return null; + +} +} + +} + +/// @nodoc +@JsonSerializable() + +class _Role implements Role { + const _Role({required this.id, required this.roleName, required this.description, required this.type, required final List permissions}): _permissions = permissions; + factory _Role.fromJson(Map json) => _$RoleFromJson(json); + +@override final int id; +@override final String roleName; +@override final String description; +@override final RoleType type; + final List _permissions; +@override List get permissions { + if (_permissions is EqualUnmodifiableListView) return _permissions; + // ignore: implicit_dynamic_type + return EqualUnmodifiableListView(_permissions); +} + + +/// Create a copy of Role +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$RoleCopyWith<_Role> get copyWith => __$RoleCopyWithImpl<_Role>(this, _$identity); + +@override +Map toJson() { + return _$RoleToJson(this, ); +} + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _Role&&(identical(other.id, id) || other.id == id)&&(identical(other.roleName, roleName) || other.roleName == roleName)&&(identical(other.description, description) || other.description == description)&&(identical(other.type, type) || other.type == type)&&const DeepCollectionEquality().equals(other._permissions, _permissions)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,id,roleName,description,type,const DeepCollectionEquality().hash(_permissions)); + +@override +String toString() { + return 'Role(id: $id, roleName: $roleName, description: $description, type: $type, permissions: $permissions)'; +} + + +} + +/// @nodoc +abstract mixin class _$RoleCopyWith<$Res> implements $RoleCopyWith<$Res> { + factory _$RoleCopyWith(_Role value, $Res Function(_Role) _then) = __$RoleCopyWithImpl; +@override @useResult +$Res call({ + int id, String roleName, String description, RoleType type, List permissions +}); + + +@override $RoleTypeCopyWith<$Res> get type; + +} +/// @nodoc +class __$RoleCopyWithImpl<$Res> + implements _$RoleCopyWith<$Res> { + __$RoleCopyWithImpl(this._self, this._then); + + final _Role _self; + final $Res Function(_Role) _then; + +/// Create a copy of Role +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? id = null,Object? roleName = null,Object? description = null,Object? type = null,Object? permissions = null,}) { + return _then(_Role( +id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable +as int,roleName: null == roleName ? _self.roleName : roleName // ignore: cast_nullable_to_non_nullable +as String,description: null == description ? _self.description : description // ignore: cast_nullable_to_non_nullable +as String,type: null == type ? _self.type : type // ignore: cast_nullable_to_non_nullable +as RoleType,permissions: null == permissions ? _self._permissions : permissions // ignore: cast_nullable_to_non_nullable +as List, + )); +} + +/// Create a copy of Role +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$RoleTypeCopyWith<$Res> get type { + + return $RoleTypeCopyWith<$Res>(_self.type, (value) { + return _then(_self.copyWith(type: value)); + }); +} +} + + +/// @nodoc +mixin _$RoleType { + + String? get key; String get name; +/// Create a copy of RoleType +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$RoleTypeCopyWith get copyWith => _$RoleTypeCopyWithImpl(this as RoleType, _$identity); + + /// Serializes this RoleType to a JSON map. + Map toJson(); + + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is RoleType&&(identical(other.key, key) || other.key == key)&&(identical(other.name, name) || other.name == name)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,key,name); + +@override +String toString() { + return 'RoleType(key: $key, name: $name)'; +} + + +} + +/// @nodoc +abstract mixin class $RoleTypeCopyWith<$Res> { + factory $RoleTypeCopyWith(RoleType value, $Res Function(RoleType) _then) = _$RoleTypeCopyWithImpl; +@useResult +$Res call({ + String? key, String name +}); + + + + +} +/// @nodoc +class _$RoleTypeCopyWithImpl<$Res> + implements $RoleTypeCopyWith<$Res> { + _$RoleTypeCopyWithImpl(this._self, this._then); + + final RoleType _self; + final $Res Function(RoleType) _then; + +/// Create a copy of RoleType +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? key = freezed,Object? name = null,}) { + return _then(_self.copyWith( +key: freezed == key ? _self.key : key // ignore: cast_nullable_to_non_nullable +as String?,name: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable +as String, + )); +} + +} + + +/// Adds pattern-matching-related methods to [RoleType]. +extension RoleTypePatterns on RoleType { +/// 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 Function( _RoleType value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _RoleType() 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 Function( _RoleType value) $default,){ +final _that = this; +switch (_that) { +case _RoleType(): +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? Function( _RoleType value)? $default,){ +final _that = this; +switch (_that) { +case _RoleType() 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 Function( String? key, String name)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _RoleType() when $default != null: +return $default(_that.key,_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 Function( String? key, String name) $default,) {final _that = this; +switch (_that) { +case _RoleType(): +return $default(_that.key,_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? Function( String? key, String name)? $default,) {final _that = this; +switch (_that) { +case _RoleType() when $default != null: +return $default(_that.key,_that.name);case _: + return null; + +} +} + +} + +/// @nodoc +@JsonSerializable() + +class _RoleType implements RoleType { + const _RoleType({this.key, required this.name}); + factory _RoleType.fromJson(Map json) => _$RoleTypeFromJson(json); + +@override final String? key; +@override final String name; + +/// Create a copy of RoleType +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$RoleTypeCopyWith<_RoleType> get copyWith => __$RoleTypeCopyWithImpl<_RoleType>(this, _$identity); + +@override +Map toJson() { + return _$RoleTypeToJson(this, ); +} + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _RoleType&&(identical(other.key, key) || other.key == key)&&(identical(other.name, name) || other.name == name)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,key,name); + +@override +String toString() { + return 'RoleType(key: $key, name: $name)'; +} + + +} + +/// @nodoc +abstract mixin class _$RoleTypeCopyWith<$Res> implements $RoleTypeCopyWith<$Res> { + factory _$RoleTypeCopyWith(_RoleType value, $Res Function(_RoleType) _then) = __$RoleTypeCopyWithImpl; +@override @useResult +$Res call({ + String? key, String name +}); + + + + +} +/// @nodoc +class __$RoleTypeCopyWithImpl<$Res> + implements _$RoleTypeCopyWith<$Res> { + __$RoleTypeCopyWithImpl(this._self, this._then); + + final _RoleType _self; + final $Res Function(_RoleType) _then; + +/// Create a copy of RoleType +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? key = freezed,Object? name = null,}) { + return _then(_RoleType( +key: freezed == key ? _self.key : key // ignore: cast_nullable_to_non_nullable +as String?,name: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable +as String, + )); +} + + +} + + +/// @nodoc +mixin _$Permission { + + String get pageName; List get pageAccess; +/// Create a copy of Permission +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$PermissionCopyWith get copyWith => _$PermissionCopyWithImpl(this as Permission, _$identity); + + /// Serializes this Permission to a JSON map. + Map toJson(); + + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is Permission&&(identical(other.pageName, pageName) || other.pageName == pageName)&&const DeepCollectionEquality().equals(other.pageAccess, pageAccess)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,pageName,const DeepCollectionEquality().hash(pageAccess)); + +@override +String toString() { + return 'Permission(pageName: $pageName, pageAccess: $pageAccess)'; +} + + +} + +/// @nodoc +abstract mixin class $PermissionCopyWith<$Res> { + factory $PermissionCopyWith(Permission value, $Res Function(Permission) _then) = _$PermissionCopyWithImpl; +@useResult +$Res call({ + String pageName, List pageAccess +}); + + + + +} +/// @nodoc +class _$PermissionCopyWithImpl<$Res> + implements $PermissionCopyWith<$Res> { + _$PermissionCopyWithImpl(this._self, this._then); + + final Permission _self; + final $Res Function(Permission) _then; + +/// Create a copy of Permission +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? pageName = null,Object? pageAccess = null,}) { + return _then(_self.copyWith( +pageName: null == pageName ? _self.pageName : pageName // ignore: cast_nullable_to_non_nullable +as String,pageAccess: null == pageAccess ? _self.pageAccess : pageAccess // ignore: cast_nullable_to_non_nullable +as List, + )); +} + +} + + +/// Adds pattern-matching-related methods to [Permission]. +extension PermissionPatterns on Permission { +/// 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 Function( _Permission value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _Permission() 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 Function( _Permission value) $default,){ +final _that = this; +switch (_that) { +case _Permission(): +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? Function( _Permission value)? $default,){ +final _that = this; +switch (_that) { +case _Permission() 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 Function( String pageName, List pageAccess)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _Permission() when $default != null: +return $default(_that.pageName,_that.pageAccess);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 Function( String pageName, List pageAccess) $default,) {final _that = this; +switch (_that) { +case _Permission(): +return $default(_that.pageName,_that.pageAccess);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? Function( String pageName, List pageAccess)? $default,) {final _that = this; +switch (_that) { +case _Permission() when $default != null: +return $default(_that.pageName,_that.pageAccess);case _: + return null; + +} +} + +} + +/// @nodoc +@JsonSerializable() + +class _Permission implements Permission { + const _Permission({required this.pageName, required final List pageAccess}): _pageAccess = pageAccess; + factory _Permission.fromJson(Map json) => _$PermissionFromJson(json); + +@override final String pageName; + final List _pageAccess; +@override List get pageAccess { + if (_pageAccess is EqualUnmodifiableListView) return _pageAccess; + // ignore: implicit_dynamic_type + return EqualUnmodifiableListView(_pageAccess); +} + + +/// Create a copy of Permission +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$PermissionCopyWith<_Permission> get copyWith => __$PermissionCopyWithImpl<_Permission>(this, _$identity); + +@override +Map toJson() { + return _$PermissionToJson(this, ); +} + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _Permission&&(identical(other.pageName, pageName) || other.pageName == pageName)&&const DeepCollectionEquality().equals(other._pageAccess, _pageAccess)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,pageName,const DeepCollectionEquality().hash(_pageAccess)); + +@override +String toString() { + return 'Permission(pageName: $pageName, pageAccess: $pageAccess)'; +} + + +} + +/// @nodoc +abstract mixin class _$PermissionCopyWith<$Res> implements $PermissionCopyWith<$Res> { + factory _$PermissionCopyWith(_Permission value, $Res Function(_Permission) _then) = __$PermissionCopyWithImpl; +@override @useResult +$Res call({ + String pageName, List pageAccess +}); + + + + +} +/// @nodoc +class __$PermissionCopyWithImpl<$Res> + implements _$PermissionCopyWith<$Res> { + __$PermissionCopyWithImpl(this._self, this._then); + + final _Permission _self; + final $Res Function(_Permission) _then; + +/// Create a copy of Permission +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? pageName = null,Object? pageAccess = null,}) { + return _then(_Permission( +pageName: null == pageName ? _self.pageName : pageName // ignore: cast_nullable_to_non_nullable +as String,pageAccess: null == pageAccess ? _self._pageAccess : pageAccess // ignore: cast_nullable_to_non_nullable +as List, + )); +} + + +} + +// dart format on diff --git a/packages/inspection/lib/data/model/response/user_profile/user_profile_model.g.dart b/packages/inspection/lib/data/model/response/user_profile/user_profile_model.g.dart new file mode 100644 index 0000000..7bf5323 --- /dev/null +++ b/packages/inspection/lib/data/model/response/user_profile/user_profile_model.g.dart @@ -0,0 +1,104 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'user_profile_model.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +_UserProfileModel _$UserProfileModelFromJson(Map json) => + _UserProfileModel( + user: User.fromJson(json['user'] as Map), + role: Role.fromJson(json['role'] as Map), + permissions: (json['permissions'] as List) + .map((e) => Permission.fromJson(e as Map)) + .toList(), + ); + +Map _$UserProfileModelToJson(_UserProfileModel instance) => + { + 'user': instance.user, + 'role': instance.role, + 'permissions': instance.permissions, + }; + +_User _$UserFromJson(Map json) => _User( + id: (json['id'] as num).toInt(), + username: json['username'] as String, + password: json['password'] as String, + firstName: json['first_name'] as String, + lastName: json['last_name'] as String, + isActive: json['is_active'] as bool, + mobile: json['mobile'] as String, + phone: json['phone'] as String, + nationalCode: json['national_code'] as String, + birthdate: DateTime.parse(json['birthdate'] as String), + nationality: json['nationality'] as String, + ownership: json['ownership'] as String, + address: json['address'] as String, + photo: json['photo'] as String, + province: (json['province'] as num).toInt(), + city: (json['city'] as num).toInt(), + otpStatus: json['otp_status'] as bool, + cityName: json['city_name'] as String, + provinceName: json['province_name'] as String, +); + +Map _$UserToJson(_User instance) => { + 'id': instance.id, + 'username': instance.username, + 'password': instance.password, + 'first_name': instance.firstName, + 'last_name': instance.lastName, + 'is_active': instance.isActive, + 'mobile': instance.mobile, + 'phone': instance.phone, + 'national_code': instance.nationalCode, + 'birthdate': instance.birthdate.toIso8601String(), + 'nationality': instance.nationality, + 'ownership': instance.ownership, + 'address': instance.address, + 'photo': instance.photo, + 'province': instance.province, + 'city': instance.city, + 'otp_status': instance.otpStatus, + 'city_name': instance.cityName, + 'province_name': instance.provinceName, +}; + +_Role _$RoleFromJson(Map json) => _Role( + id: (json['id'] as num).toInt(), + roleName: json['role_name'] as String, + description: json['description'] as String, + type: RoleType.fromJson(json['type'] as Map), + permissions: json['permissions'] as List, +); + +Map _$RoleToJson(_Role instance) => { + 'id': instance.id, + 'role_name': instance.roleName, + 'description': instance.description, + 'type': instance.type, + 'permissions': instance.permissions, +}; + +_RoleType _$RoleTypeFromJson(Map json) => + _RoleType(key: json['key'] as String?, name: json['name'] as String); + +Map _$RoleTypeToJson(_RoleType instance) => { + 'key': instance.key, + 'name': instance.name, +}; + +_Permission _$PermissionFromJson(Map json) => _Permission( + pageName: json['page_name'] as String, + pageAccess: (json['page_access'] as List) + .map((e) => e as String) + .toList(), +); + +Map _$PermissionToJson(_Permission instance) => + { + 'page_name': instance.pageName, + 'page_access': instance.pageAccess, + };