Files
tm_app/lib/data/services/model/notification_data/notification_recipient.freezed.dart
2025-09-27 13:02:12 +03:30

585 lines
22 KiB
Dart

// 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 'notification_recipient.dart';
// **************************************************************************
// FreezedGenerator
// **************************************************************************
// dart format off
T _$identity<T>(T value) => value;
/// @nodoc
mixin _$Recipient {
String? get id;@JsonKey(name: 'full_name') String? get fullName; String? get username; String? get email; String? get status; String? get type; String? get role; String? get phone;@JsonKey(name: 'updated_at') int? get updatedAt;@JsonKey(name: 'created_at') int? get createdAt;@JsonKey(name: 'last_login_at') int? get lastLoginAt; List<Company>? get companies;
/// Create a copy of Recipient
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
$RecipientCopyWith<Recipient> get copyWith => _$RecipientCopyWithImpl<Recipient>(this as Recipient, _$identity);
/// Serializes this Recipient to a JSON map.
Map<String, dynamic> toJson();
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is Recipient&&(identical(other.id, id) || other.id == id)&&(identical(other.fullName, fullName) || other.fullName == fullName)&&(identical(other.username, username) || other.username == username)&&(identical(other.email, email) || other.email == email)&&(identical(other.status, status) || other.status == status)&&(identical(other.type, type) || other.type == type)&&(identical(other.role, role) || other.role == role)&&(identical(other.phone, phone) || other.phone == phone)&&(identical(other.updatedAt, updatedAt) || other.updatedAt == updatedAt)&&(identical(other.createdAt, createdAt) || other.createdAt == createdAt)&&(identical(other.lastLoginAt, lastLoginAt) || other.lastLoginAt == lastLoginAt)&&const DeepCollectionEquality().equals(other.companies, companies));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType,id,fullName,username,email,status,type,role,phone,updatedAt,createdAt,lastLoginAt,const DeepCollectionEquality().hash(companies));
@override
String toString() {
return 'Recipient(id: $id, fullName: $fullName, username: $username, email: $email, status: $status, type: $type, role: $role, phone: $phone, updatedAt: $updatedAt, createdAt: $createdAt, lastLoginAt: $lastLoginAt, companies: $companies)';
}
}
/// @nodoc
abstract mixin class $RecipientCopyWith<$Res> {
factory $RecipientCopyWith(Recipient value, $Res Function(Recipient) _then) = _$RecipientCopyWithImpl;
@useResult
$Res call({
String? id,@JsonKey(name: 'full_name') String? fullName, String? username, String? email, String? status, String? type, String? role, String? phone,@JsonKey(name: 'updated_at') int? updatedAt,@JsonKey(name: 'created_at') int? createdAt,@JsonKey(name: 'last_login_at') int? lastLoginAt, List<Company>? companies
});
}
/// @nodoc
class _$RecipientCopyWithImpl<$Res>
implements $RecipientCopyWith<$Res> {
_$RecipientCopyWithImpl(this._self, this._then);
final Recipient _self;
final $Res Function(Recipient) _then;
/// Create a copy of Recipient
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @override $Res call({Object? id = freezed,Object? fullName = freezed,Object? username = freezed,Object? email = freezed,Object? status = freezed,Object? type = freezed,Object? role = freezed,Object? phone = freezed,Object? updatedAt = freezed,Object? createdAt = freezed,Object? lastLoginAt = freezed,Object? companies = freezed,}) {
return _then(_self.copyWith(
id: freezed == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
as String?,fullName: freezed == fullName ? _self.fullName : fullName // ignore: cast_nullable_to_non_nullable
as String?,username: freezed == username ? _self.username : username // ignore: cast_nullable_to_non_nullable
as String?,email: freezed == email ? _self.email : email // ignore: cast_nullable_to_non_nullable
as String?,status: freezed == status ? _self.status : status // ignore: cast_nullable_to_non_nullable
as String?,type: freezed == type ? _self.type : type // ignore: cast_nullable_to_non_nullable
as String?,role: freezed == role ? _self.role : role // ignore: cast_nullable_to_non_nullable
as String?,phone: freezed == phone ? _self.phone : phone // ignore: cast_nullable_to_non_nullable
as String?,updatedAt: freezed == updatedAt ? _self.updatedAt : updatedAt // ignore: cast_nullable_to_non_nullable
as int?,createdAt: freezed == createdAt ? _self.createdAt : createdAt // ignore: cast_nullable_to_non_nullable
as int?,lastLoginAt: freezed == lastLoginAt ? _self.lastLoginAt : lastLoginAt // ignore: cast_nullable_to_non_nullable
as int?,companies: freezed == companies ? _self.companies : companies // ignore: cast_nullable_to_non_nullable
as List<Company>?,
));
}
}
/// Adds pattern-matching-related methods to [Recipient].
extension RecipientPatterns on Recipient {
/// A variant of `map` that fallback to returning `orElse`.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case _:
/// return orElse();
/// }
/// ```
@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _Recipient value)? $default,{required TResult orElse(),}){
final _that = this;
switch (_that) {
case _Recipient() when $default != null:
return $default(_that);case _:
return orElse();
}
}
/// A `switch`-like method, using callbacks.
///
/// Callbacks receives the raw object, upcasted.
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case final Subclass2 value:
/// return ...;
/// }
/// ```
@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _Recipient value) $default,){
final _that = this;
switch (_that) {
case _Recipient():
return $default(_that);case _:
throw StateError('Unexpected subclass');
}
}
/// A variant of `map` that fallback to returning `null`.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case _:
/// return null;
/// }
/// ```
@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _Recipient value)? $default,){
final _that = this;
switch (_that) {
case _Recipient() when $default != null:
return $default(_that);case _:
return null;
}
}
/// A variant of `when` that fallback to an `orElse` callback.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case _:
/// return orElse();
/// }
/// ```
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( String? id, @JsonKey(name: 'full_name') String? fullName, String? username, String? email, String? status, String? type, String? role, String? phone, @JsonKey(name: 'updated_at') int? updatedAt, @JsonKey(name: 'created_at') int? createdAt, @JsonKey(name: 'last_login_at') int? lastLoginAt, List<Company>? companies)? $default,{required TResult orElse(),}) {final _that = this;
switch (_that) {
case _Recipient() when $default != null:
return $default(_that.id,_that.fullName,_that.username,_that.email,_that.status,_that.type,_that.role,_that.phone,_that.updatedAt,_that.createdAt,_that.lastLoginAt,_that.companies);case _:
return orElse();
}
}
/// A `switch`-like method, using callbacks.
///
/// As opposed to `map`, this offers destructuring.
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case Subclass2(:final field2):
/// return ...;
/// }
/// ```
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( String? id, @JsonKey(name: 'full_name') String? fullName, String? username, String? email, String? status, String? type, String? role, String? phone, @JsonKey(name: 'updated_at') int? updatedAt, @JsonKey(name: 'created_at') int? createdAt, @JsonKey(name: 'last_login_at') int? lastLoginAt, List<Company>? companies) $default,) {final _that = this;
switch (_that) {
case _Recipient():
return $default(_that.id,_that.fullName,_that.username,_that.email,_that.status,_that.type,_that.role,_that.phone,_that.updatedAt,_that.createdAt,_that.lastLoginAt,_that.companies);case _:
throw StateError('Unexpected subclass');
}
}
/// A variant of `when` that fallback to returning `null`
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case _:
/// return null;
/// }
/// ```
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( String? id, @JsonKey(name: 'full_name') String? fullName, String? username, String? email, String? status, String? type, String? role, String? phone, @JsonKey(name: 'updated_at') int? updatedAt, @JsonKey(name: 'created_at') int? createdAt, @JsonKey(name: 'last_login_at') int? lastLoginAt, List<Company>? companies)? $default,) {final _that = this;
switch (_that) {
case _Recipient() when $default != null:
return $default(_that.id,_that.fullName,_that.username,_that.email,_that.status,_that.type,_that.role,_that.phone,_that.updatedAt,_that.createdAt,_that.lastLoginAt,_that.companies);case _:
return null;
}
}
}
/// @nodoc
@JsonSerializable()
class _Recipient implements Recipient {
const _Recipient({required this.id, @JsonKey(name: 'full_name') required this.fullName, required this.username, required this.email, required this.status, required this.type, required this.role, required this.phone, @JsonKey(name: 'updated_at') required this.updatedAt, @JsonKey(name: 'created_at') required this.createdAt, @JsonKey(name: 'last_login_at') required this.lastLoginAt, required final List<Company>? companies}): _companies = companies;
factory _Recipient.fromJson(Map<String, dynamic> json) => _$RecipientFromJson(json);
@override final String? id;
@override@JsonKey(name: 'full_name') final String? fullName;
@override final String? username;
@override final String? email;
@override final String? status;
@override final String? type;
@override final String? role;
@override final String? phone;
@override@JsonKey(name: 'updated_at') final int? updatedAt;
@override@JsonKey(name: 'created_at') final int? createdAt;
@override@JsonKey(name: 'last_login_at') final int? lastLoginAt;
final List<Company>? _companies;
@override List<Company>? get companies {
final value = _companies;
if (value == null) return null;
if (_companies is EqualUnmodifiableListView) return _companies;
// ignore: implicit_dynamic_type
return EqualUnmodifiableListView(value);
}
/// Create a copy of Recipient
/// with the given fields replaced by the non-null parameter values.
@override @JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
_$RecipientCopyWith<_Recipient> get copyWith => __$RecipientCopyWithImpl<_Recipient>(this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$RecipientToJson(this, );
}
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is _Recipient&&(identical(other.id, id) || other.id == id)&&(identical(other.fullName, fullName) || other.fullName == fullName)&&(identical(other.username, username) || other.username == username)&&(identical(other.email, email) || other.email == email)&&(identical(other.status, status) || other.status == status)&&(identical(other.type, type) || other.type == type)&&(identical(other.role, role) || other.role == role)&&(identical(other.phone, phone) || other.phone == phone)&&(identical(other.updatedAt, updatedAt) || other.updatedAt == updatedAt)&&(identical(other.createdAt, createdAt) || other.createdAt == createdAt)&&(identical(other.lastLoginAt, lastLoginAt) || other.lastLoginAt == lastLoginAt)&&const DeepCollectionEquality().equals(other._companies, _companies));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType,id,fullName,username,email,status,type,role,phone,updatedAt,createdAt,lastLoginAt,const DeepCollectionEquality().hash(_companies));
@override
String toString() {
return 'Recipient(id: $id, fullName: $fullName, username: $username, email: $email, status: $status, type: $type, role: $role, phone: $phone, updatedAt: $updatedAt, createdAt: $createdAt, lastLoginAt: $lastLoginAt, companies: $companies)';
}
}
/// @nodoc
abstract mixin class _$RecipientCopyWith<$Res> implements $RecipientCopyWith<$Res> {
factory _$RecipientCopyWith(_Recipient value, $Res Function(_Recipient) _then) = __$RecipientCopyWithImpl;
@override @useResult
$Res call({
String? id,@JsonKey(name: 'full_name') String? fullName, String? username, String? email, String? status, String? type, String? role, String? phone,@JsonKey(name: 'updated_at') int? updatedAt,@JsonKey(name: 'created_at') int? createdAt,@JsonKey(name: 'last_login_at') int? lastLoginAt, List<Company>? companies
});
}
/// @nodoc
class __$RecipientCopyWithImpl<$Res>
implements _$RecipientCopyWith<$Res> {
__$RecipientCopyWithImpl(this._self, this._then);
final _Recipient _self;
final $Res Function(_Recipient) _then;
/// Create a copy of Recipient
/// with the given fields replaced by the non-null parameter values.
@override @pragma('vm:prefer-inline') $Res call({Object? id = freezed,Object? fullName = freezed,Object? username = freezed,Object? email = freezed,Object? status = freezed,Object? type = freezed,Object? role = freezed,Object? phone = freezed,Object? updatedAt = freezed,Object? createdAt = freezed,Object? lastLoginAt = freezed,Object? companies = freezed,}) {
return _then(_Recipient(
id: freezed == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
as String?,fullName: freezed == fullName ? _self.fullName : fullName // ignore: cast_nullable_to_non_nullable
as String?,username: freezed == username ? _self.username : username // ignore: cast_nullable_to_non_nullable
as String?,email: freezed == email ? _self.email : email // ignore: cast_nullable_to_non_nullable
as String?,status: freezed == status ? _self.status : status // ignore: cast_nullable_to_non_nullable
as String?,type: freezed == type ? _self.type : type // ignore: cast_nullable_to_non_nullable
as String?,role: freezed == role ? _self.role : role // ignore: cast_nullable_to_non_nullable
as String?,phone: freezed == phone ? _self.phone : phone // ignore: cast_nullable_to_non_nullable
as String?,updatedAt: freezed == updatedAt ? _self.updatedAt : updatedAt // ignore: cast_nullable_to_non_nullable
as int?,createdAt: freezed == createdAt ? _self.createdAt : createdAt // ignore: cast_nullable_to_non_nullable
as int?,lastLoginAt: freezed == lastLoginAt ? _self.lastLoginAt : lastLoginAt // ignore: cast_nullable_to_non_nullable
as int?,companies: freezed == companies ? _self._companies : companies // ignore: cast_nullable_to_non_nullable
as List<Company>?,
));
}
}
/// @nodoc
mixin _$Company {
String? get id; String? get name;
/// Create a copy of Company
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
$CompanyCopyWith<Company> get copyWith => _$CompanyCopyWithImpl<Company>(this as Company, _$identity);
/// Serializes this Company to a JSON map.
Map<String, dynamic> toJson();
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is Company&&(identical(other.id, id) || other.id == id)&&(identical(other.name, name) || other.name == name));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType,id,name);
@override
String toString() {
return 'Company(id: $id, name: $name)';
}
}
/// @nodoc
abstract mixin class $CompanyCopyWith<$Res> {
factory $CompanyCopyWith(Company value, $Res Function(Company) _then) = _$CompanyCopyWithImpl;
@useResult
$Res call({
String? id, String? name
});
}
/// @nodoc
class _$CompanyCopyWithImpl<$Res>
implements $CompanyCopyWith<$Res> {
_$CompanyCopyWithImpl(this._self, this._then);
final Company _self;
final $Res Function(Company) _then;
/// Create a copy of Company
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @override $Res call({Object? id = freezed,Object? name = freezed,}) {
return _then(_self.copyWith(
id: freezed == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
as String?,name: freezed == name ? _self.name : name // ignore: cast_nullable_to_non_nullable
as String?,
));
}
}
/// Adds pattern-matching-related methods to [Company].
extension CompanyPatterns on Company {
/// A variant of `map` that fallback to returning `orElse`.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case _:
/// return orElse();
/// }
/// ```
@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _Company value)? $default,{required TResult orElse(),}){
final _that = this;
switch (_that) {
case _Company() when $default != null:
return $default(_that);case _:
return orElse();
}
}
/// A `switch`-like method, using callbacks.
///
/// Callbacks receives the raw object, upcasted.
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case final Subclass2 value:
/// return ...;
/// }
/// ```
@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _Company value) $default,){
final _that = this;
switch (_that) {
case _Company():
return $default(_that);case _:
throw StateError('Unexpected subclass');
}
}
/// A variant of `map` that fallback to returning `null`.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case _:
/// return null;
/// }
/// ```
@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _Company value)? $default,){
final _that = this;
switch (_that) {
case _Company() when $default != null:
return $default(_that);case _:
return null;
}
}
/// A variant of `when` that fallback to an `orElse` callback.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case _:
/// return orElse();
/// }
/// ```
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( String? id, String? name)? $default,{required TResult orElse(),}) {final _that = this;
switch (_that) {
case _Company() when $default != null:
return $default(_that.id,_that.name);case _:
return orElse();
}
}
/// A `switch`-like method, using callbacks.
///
/// As opposed to `map`, this offers destructuring.
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case Subclass2(:final field2):
/// return ...;
/// }
/// ```
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( String? id, String? name) $default,) {final _that = this;
switch (_that) {
case _Company():
return $default(_that.id,_that.name);case _:
throw StateError('Unexpected subclass');
}
}
/// A variant of `when` that fallback to returning `null`
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case _:
/// return null;
/// }
/// ```
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( String? id, String? name)? $default,) {final _that = this;
switch (_that) {
case _Company() when $default != null:
return $default(_that.id,_that.name);case _:
return null;
}
}
}
/// @nodoc
@JsonSerializable()
class _Company implements Company {
const _Company({required this.id, required this.name});
factory _Company.fromJson(Map<String, dynamic> json) => _$CompanyFromJson(json);
@override final String? id;
@override final String? name;
/// Create a copy of Company
/// with the given fields replaced by the non-null parameter values.
@override @JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
_$CompanyCopyWith<_Company> get copyWith => __$CompanyCopyWithImpl<_Company>(this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$CompanyToJson(this, );
}
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is _Company&&(identical(other.id, id) || other.id == id)&&(identical(other.name, name) || other.name == name));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType,id,name);
@override
String toString() {
return 'Company(id: $id, name: $name)';
}
}
/// @nodoc
abstract mixin class _$CompanyCopyWith<$Res> implements $CompanyCopyWith<$Res> {
factory _$CompanyCopyWith(_Company value, $Res Function(_Company) _then) = __$CompanyCopyWithImpl;
@override @useResult
$Res call({
String? id, String? name
});
}
/// @nodoc
class __$CompanyCopyWithImpl<$Res>
implements _$CompanyCopyWith<$Res> {
__$CompanyCopyWithImpl(this._self, this._then);
final _Company _self;
final $Res Function(_Company) _then;
/// Create a copy of Company
/// with the given fields replaced by the non-null parameter values.
@override @pragma('vm:prefer-inline') $Res call({Object? id = freezed,Object? name = freezed,}) {
return _then(_Company(
id: freezed == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
as String?,name: freezed == name ? _self.name : name // ignore: cast_nullable_to_non_nullable
as String?,
));
}
}
// dart format on