// 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_message_model.dart'; // ************************************************************************** // FreezedGenerator // ************************************************************************** T _$identity(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'); ChatMessageModel _$ChatMessageModelFromJson(Map json) { return _ChatMessageModel.fromJson(json); } /// @nodoc mixin _$ChatMessageModel { int get id => throw _privateConstructorUsedError; String get data => throw _privateConstructorUsedError; @JsonKey(name: 'media_data') List? get mediaData => throw _privateConstructorUsedError; @JsonKey(name: 'author_id') int get authorId => throw _privateConstructorUsedError; @JsonKey(name: 'updated_at', fromJson: parseDate) DateTime get updatedAt => throw _privateConstructorUsedError; @JsonKey(name: 'read_by_to_user', defaultValue: false) bool get isRead => throw _privateConstructorUsedError; @JsonKey(name: 'is_author_message_auth_user') bool? get isCurrentUserAuthor => throw _privateConstructorUsedError; @JsonKey(name: 'room_id') String? get roomId => throw _privateConstructorUsedError; /// Serializes this ChatMessageModel to a JSON map. Map toJson() => throw _privateConstructorUsedError; /// Create a copy of ChatMessageModel /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) $ChatMessageModelCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $ChatMessageModelCopyWith<$Res> { factory $ChatMessageModelCopyWith( ChatMessageModel value, $Res Function(ChatMessageModel) then) = _$ChatMessageModelCopyWithImpl<$Res, ChatMessageModel>; @useResult $Res call( {int id, String data, @JsonKey(name: 'media_data') List? mediaData, @JsonKey(name: 'author_id') int authorId, @JsonKey(name: 'updated_at', fromJson: parseDate) DateTime updatedAt, @JsonKey(name: 'read_by_to_user', defaultValue: false) bool isRead, @JsonKey(name: 'is_author_message_auth_user') bool? isCurrentUserAuthor, @JsonKey(name: 'room_id') String? roomId}); } /// @nodoc class _$ChatMessageModelCopyWithImpl<$Res, $Val extends ChatMessageModel> implements $ChatMessageModelCopyWith<$Res> { _$ChatMessageModelCopyWithImpl(this._value, this._then); // ignore: unused_field final $Val _value; // ignore: unused_field final $Res Function($Val) _then; /// Create a copy of ChatMessageModel /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override $Res call({ Object? id = null, Object? data = null, Object? mediaData = freezed, Object? authorId = null, Object? updatedAt = null, Object? isRead = null, Object? isCurrentUserAuthor = freezed, Object? roomId = freezed, }) { return _then(_value.copyWith( id: null == id ? _value.id : id // ignore: cast_nullable_to_non_nullable as int, data: null == data ? _value.data : data // ignore: cast_nullable_to_non_nullable as String, mediaData: freezed == mediaData ? _value.mediaData : mediaData // ignore: cast_nullable_to_non_nullable as List?, authorId: null == authorId ? _value.authorId : authorId // ignore: cast_nullable_to_non_nullable as int, updatedAt: null == updatedAt ? _value.updatedAt : updatedAt // ignore: cast_nullable_to_non_nullable as DateTime, isRead: null == isRead ? _value.isRead : isRead // ignore: cast_nullable_to_non_nullable as bool, isCurrentUserAuthor: freezed == isCurrentUserAuthor ? _value.isCurrentUserAuthor : isCurrentUserAuthor // ignore: cast_nullable_to_non_nullable as bool?, roomId: freezed == roomId ? _value.roomId : roomId // ignore: cast_nullable_to_non_nullable as String?, ) as $Val); } } /// @nodoc abstract class _$$ChatMessageModelImplCopyWith<$Res> implements $ChatMessageModelCopyWith<$Res> { factory _$$ChatMessageModelImplCopyWith(_$ChatMessageModelImpl value, $Res Function(_$ChatMessageModelImpl) then) = __$$ChatMessageModelImplCopyWithImpl<$Res>; @override @useResult $Res call( {int id, String data, @JsonKey(name: 'media_data') List? mediaData, @JsonKey(name: 'author_id') int authorId, @JsonKey(name: 'updated_at', fromJson: parseDate) DateTime updatedAt, @JsonKey(name: 'read_by_to_user', defaultValue: false) bool isRead, @JsonKey(name: 'is_author_message_auth_user') bool? isCurrentUserAuthor, @JsonKey(name: 'room_id') String? roomId}); } /// @nodoc class __$$ChatMessageModelImplCopyWithImpl<$Res> extends _$ChatMessageModelCopyWithImpl<$Res, _$ChatMessageModelImpl> implements _$$ChatMessageModelImplCopyWith<$Res> { __$$ChatMessageModelImplCopyWithImpl(_$ChatMessageModelImpl _value, $Res Function(_$ChatMessageModelImpl) _then) : super(_value, _then); /// Create a copy of ChatMessageModel /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override $Res call({ Object? id = null, Object? data = null, Object? mediaData = freezed, Object? authorId = null, Object? updatedAt = null, Object? isRead = null, Object? isCurrentUserAuthor = freezed, Object? roomId = freezed, }) { return _then(_$ChatMessageModelImpl( id: null == id ? _value.id : id // ignore: cast_nullable_to_non_nullable as int, data: null == data ? _value.data : data // ignore: cast_nullable_to_non_nullable as String, mediaData: freezed == mediaData ? _value._mediaData : mediaData // ignore: cast_nullable_to_non_nullable as List?, authorId: null == authorId ? _value.authorId : authorId // ignore: cast_nullable_to_non_nullable as int, updatedAt: null == updatedAt ? _value.updatedAt : updatedAt // ignore: cast_nullable_to_non_nullable as DateTime, isRead: null == isRead ? _value.isRead : isRead // ignore: cast_nullable_to_non_nullable as bool, isCurrentUserAuthor: freezed == isCurrentUserAuthor ? _value.isCurrentUserAuthor : isCurrentUserAuthor // ignore: cast_nullable_to_non_nullable as bool?, roomId: freezed == roomId ? _value.roomId : roomId // ignore: cast_nullable_to_non_nullable as String?, )); } } /// @nodoc @JsonSerializable() class _$ChatMessageModelImpl implements _ChatMessageModel { const _$ChatMessageModelImpl( {required this.id, required this.data, @JsonKey(name: 'media_data') required final List? mediaData, @JsonKey(name: 'author_id') required this.authorId, @JsonKey(name: 'updated_at', fromJson: parseDate) required this.updatedAt, @JsonKey(name: 'read_by_to_user', defaultValue: false) required this.isRead, @JsonKey(name: 'is_author_message_auth_user') required this.isCurrentUserAuthor, @JsonKey(name: 'room_id') required this.roomId}) : _mediaData = mediaData; factory _$ChatMessageModelImpl.fromJson(Map json) => _$$ChatMessageModelImplFromJson(json); @override final int id; @override final String data; final List? _mediaData; @override @JsonKey(name: 'media_data') List? get mediaData { final value = _mediaData; if (value == null) return null; if (_mediaData is EqualUnmodifiableListView) return _mediaData; // ignore: implicit_dynamic_type return EqualUnmodifiableListView(value); } @override @JsonKey(name: 'author_id') final int authorId; @override @JsonKey(name: 'updated_at', fromJson: parseDate) final DateTime updatedAt; @override @JsonKey(name: 'read_by_to_user', defaultValue: false) final bool isRead; @override @JsonKey(name: 'is_author_message_auth_user') final bool? isCurrentUserAuthor; @override @JsonKey(name: 'room_id') final String? roomId; @override String toString() { return 'ChatMessageModel(id: $id, data: $data, mediaData: $mediaData, authorId: $authorId, updatedAt: $updatedAt, isRead: $isRead, isCurrentUserAuthor: $isCurrentUserAuthor, roomId: $roomId)'; } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$ChatMessageModelImpl && (identical(other.id, id) || other.id == id) && (identical(other.data, data) || other.data == data) && const DeepCollectionEquality() .equals(other._mediaData, _mediaData) && (identical(other.authorId, authorId) || other.authorId == authorId) && (identical(other.updatedAt, updatedAt) || other.updatedAt == updatedAt) && (identical(other.isRead, isRead) || other.isRead == isRead) && (identical(other.isCurrentUserAuthor, isCurrentUserAuthor) || other.isCurrentUserAuthor == isCurrentUserAuthor) && (identical(other.roomId, roomId) || other.roomId == roomId)); } @JsonKey(includeFromJson: false, includeToJson: false) @override int get hashCode => Object.hash( runtimeType, id, data, const DeepCollectionEquality().hash(_mediaData), authorId, updatedAt, isRead, isCurrentUserAuthor, roomId); /// Create a copy of ChatMessageModel /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') _$$ChatMessageModelImplCopyWith<_$ChatMessageModelImpl> get copyWith => __$$ChatMessageModelImplCopyWithImpl<_$ChatMessageModelImpl>( this, _$identity); @override Map toJson() { return _$$ChatMessageModelImplToJson( this, ); } } abstract class _ChatMessageModel implements ChatMessageModel { const factory _ChatMessageModel( {required final int id, required final String data, @JsonKey(name: 'media_data') required final List? mediaData, @JsonKey(name: 'author_id') required final int authorId, @JsonKey(name: 'updated_at', fromJson: parseDate) required final DateTime updatedAt, @JsonKey(name: 'read_by_to_user', defaultValue: false) required final bool isRead, @JsonKey(name: 'is_author_message_auth_user') required final bool? isCurrentUserAuthor, @JsonKey(name: 'room_id') required final String? roomId}) = _$ChatMessageModelImpl; factory _ChatMessageModel.fromJson(Map json) = _$ChatMessageModelImpl.fromJson; @override int get id; @override String get data; @override @JsonKey(name: 'media_data') List? get mediaData; @override @JsonKey(name: 'author_id') int get authorId; @override @JsonKey(name: 'updated_at', fromJson: parseDate) DateTime get updatedAt; @override @JsonKey(name: 'read_by_to_user', defaultValue: false) bool get isRead; @override @JsonKey(name: 'is_author_message_auth_user') bool? get isCurrentUserAuthor; @override @JsonKey(name: 'room_id') String? get roomId; /// Create a copy of ChatMessageModel /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) _$$ChatMessageModelImplCopyWith<_$ChatMessageModelImpl> get copyWith => throw _privateConstructorUsedError; }