Files
eatvio_app/lib/features/chat/models/chat_user_model.freezed.dart
2025-03-18 14:33:51 +07:00

285 lines
9.1 KiB
Dart

// coverage:ignore-file
// GENERATED CODE - DO NOT MODIFY BY HAND
// 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 'chat_user_model.dart';
// **************************************************************************
// FreezedGenerator
// **************************************************************************
T _$identity<T>(T value) => value;
final _privateConstructorUsedError = UnsupportedError(
'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models',
);
ChatUserModel _$ChatUserModelFromJson(Map<String, dynamic> json) {
return _ChatUserModel.fromJson(json);
}
/// @nodoc
mixin _$ChatUserModel {
int get id => throw _privateConstructorUsedError;
String get name => throw _privateConstructorUsedError;
String get slug => throw _privateConstructorUsedError;
@JsonKey(name: 'profile_photo_path')
String? get profilePhotoPath => throw _privateConstructorUsedError;
@JsonKey(name: 'profile_photo_url')
String? get profilePhotoUrl => throw _privateConstructorUsedError;
/// Serializes this ChatUserModel to a JSON map.
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
/// Create a copy of ChatUserModel
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
$ChatUserModelCopyWith<ChatUserModel> get copyWith =>
throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $ChatUserModelCopyWith<$Res> {
factory $ChatUserModelCopyWith(
ChatUserModel value,
$Res Function(ChatUserModel) then,
) = _$ChatUserModelCopyWithImpl<$Res, ChatUserModel>;
@useResult
$Res call({
int id,
String name,
String slug,
@JsonKey(name: 'profile_photo_path') String? profilePhotoPath,
@JsonKey(name: 'profile_photo_url') String? profilePhotoUrl,
});
}
/// @nodoc
class _$ChatUserModelCopyWithImpl<$Res, $Val extends ChatUserModel>
implements $ChatUserModelCopyWith<$Res> {
_$ChatUserModelCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
/// Create a copy of ChatUserModel
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Object? id = null,
Object? name = null,
Object? slug = null,
Object? profilePhotoPath = freezed,
Object? profilePhotoUrl = freezed,
}) {
return _then(
_value.copyWith(
id:
null == id
? _value.id
: id // ignore: cast_nullable_to_non_nullable
as int,
name:
null == name
? _value.name
: name // ignore: cast_nullable_to_non_nullable
as String,
slug:
null == slug
? _value.slug
: slug // ignore: cast_nullable_to_non_nullable
as String,
profilePhotoPath:
freezed == profilePhotoPath
? _value.profilePhotoPath
: profilePhotoPath // ignore: cast_nullable_to_non_nullable
as String?,
profilePhotoUrl:
freezed == profilePhotoUrl
? _value.profilePhotoUrl
: profilePhotoUrl // ignore: cast_nullable_to_non_nullable
as String?,
)
as $Val,
);
}
}
/// @nodoc
abstract class _$$ChatUserModelImplCopyWith<$Res>
implements $ChatUserModelCopyWith<$Res> {
factory _$$ChatUserModelImplCopyWith(
_$ChatUserModelImpl value,
$Res Function(_$ChatUserModelImpl) then,
) = __$$ChatUserModelImplCopyWithImpl<$Res>;
@override
@useResult
$Res call({
int id,
String name,
String slug,
@JsonKey(name: 'profile_photo_path') String? profilePhotoPath,
@JsonKey(name: 'profile_photo_url') String? profilePhotoUrl,
});
}
/// @nodoc
class __$$ChatUserModelImplCopyWithImpl<$Res>
extends _$ChatUserModelCopyWithImpl<$Res, _$ChatUserModelImpl>
implements _$$ChatUserModelImplCopyWith<$Res> {
__$$ChatUserModelImplCopyWithImpl(
_$ChatUserModelImpl _value,
$Res Function(_$ChatUserModelImpl) _then,
) : super(_value, _then);
/// Create a copy of ChatUserModel
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Object? id = null,
Object? name = null,
Object? slug = null,
Object? profilePhotoPath = freezed,
Object? profilePhotoUrl = freezed,
}) {
return _then(
_$ChatUserModelImpl(
id:
null == id
? _value.id
: id // ignore: cast_nullable_to_non_nullable
as int,
name:
null == name
? _value.name
: name // ignore: cast_nullable_to_non_nullable
as String,
slug:
null == slug
? _value.slug
: slug // ignore: cast_nullable_to_non_nullable
as String,
profilePhotoPath:
freezed == profilePhotoPath
? _value.profilePhotoPath
: profilePhotoPath // ignore: cast_nullable_to_non_nullable
as String?,
profilePhotoUrl:
freezed == profilePhotoUrl
? _value.profilePhotoUrl
: profilePhotoUrl // ignore: cast_nullable_to_non_nullable
as String?,
),
);
}
}
/// @nodoc
@JsonSerializable()
class _$ChatUserModelImpl implements _ChatUserModel {
const _$ChatUserModelImpl({
required this.id,
required this.name,
required this.slug,
@JsonKey(name: 'profile_photo_path') this.profilePhotoPath,
@JsonKey(name: 'profile_photo_url') this.profilePhotoUrl,
});
factory _$ChatUserModelImpl.fromJson(Map<String, dynamic> json) =>
_$$ChatUserModelImplFromJson(json);
@override
final int id;
@override
final String name;
@override
final String slug;
@override
@JsonKey(name: 'profile_photo_path')
final String? profilePhotoPath;
@override
@JsonKey(name: 'profile_photo_url')
final String? profilePhotoUrl;
@override
String toString() {
return 'ChatUserModel(id: $id, name: $name, slug: $slug, profilePhotoPath: $profilePhotoPath, profilePhotoUrl: $profilePhotoUrl)';
}
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$ChatUserModelImpl &&
(identical(other.id, id) || other.id == id) &&
(identical(other.name, name) || other.name == name) &&
(identical(other.slug, slug) || other.slug == slug) &&
(identical(other.profilePhotoPath, profilePhotoPath) ||
other.profilePhotoPath == profilePhotoPath) &&
(identical(other.profilePhotoUrl, profilePhotoUrl) ||
other.profilePhotoUrl == profilePhotoUrl));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(
runtimeType,
id,
name,
slug,
profilePhotoPath,
profilePhotoUrl,
);
/// Create a copy of ChatUserModel
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$ChatUserModelImplCopyWith<_$ChatUserModelImpl> get copyWith =>
__$$ChatUserModelImplCopyWithImpl<_$ChatUserModelImpl>(this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$$ChatUserModelImplToJson(this);
}
}
abstract class _ChatUserModel implements ChatUserModel {
const factory _ChatUserModel({
required final int id,
required final String name,
required final String slug,
@JsonKey(name: 'profile_photo_path') final String? profilePhotoPath,
@JsonKey(name: 'profile_photo_url') final String? profilePhotoUrl,
}) = _$ChatUserModelImpl;
factory _ChatUserModel.fromJson(Map<String, dynamic> json) =
_$ChatUserModelImpl.fromJson;
@override
int get id;
@override
String get name;
@override
String get slug;
@override
@JsonKey(name: 'profile_photo_path')
String? get profilePhotoPath;
@override
@JsonKey(name: 'profile_photo_url')
String? get profilePhotoUrl;
/// Create a copy of ChatUserModel
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
_$$ChatUserModelImplCopyWith<_$ChatUserModelImpl> get copyWith =>
throw _privateConstructorUsedError;
}