// coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // dart format off // ignore_for_file: type=lint // ignore_for_file: unused_element, unnecessary_cast, override_on_non_overriding_member // ignore_for_file: strict_raw_type, inference_failure_on_untyped_parameter part of 'message.dart'; class MessageMapper extends ClassMapperBase { MessageMapper._(); static MessageMapper? _instance; static MessageMapper ensureInitialized() { if (_instance == null) { MapperContainer.globals.use(_instance = MessageMapper._()); } return _instance!; } @override final String id = 'Message'; static String _$id(Message v) => v.id; static const Field _f$id = Field('id', _$id); static String _$message(Message v) => v.message; static const Field _f$message = Field('message', _$message); static String _$author(Message v) => v.author; static const Field _f$author = Field('author', _$author); @override final MappableFields fields = const { #id: _f$id, #message: _f$message, #author: _f$author, }; static Message _instantiate(DecodingData data) { return Message( id: data.dec(_f$id), message: data.dec(_f$message), author: data.dec(_f$author), ); } @override final Function instantiate = _instantiate; static Message fromMap(Map map) { return ensureInitialized().decodeMap(map); } static Message fromJson(String json) { return ensureInitialized().decodeJson(json); } } mixin MessageMappable { String toJson() { return MessageMapper.ensureInitialized().encodeJson( this as Message, ); } Map toMap() { return MessageMapper.ensureInitialized().encodeMap( this as Message, ); } MessageCopyWith get copyWith => _MessageCopyWithImpl( this as Message, $identity, $identity, ); @override String toString() { return MessageMapper.ensureInitialized().stringifyValue(this as Message); } @override bool operator ==(Object other) { return MessageMapper.ensureInitialized().equalsValue( this as Message, other, ); } @override int get hashCode { return MessageMapper.ensureInitialized().hashValue(this as Message); } } extension MessageValueCopy<$R, $Out> on ObjectCopyWith<$R, Message, $Out> { MessageCopyWith<$R, Message, $Out> get $asMessage => $base.as((v, t, t2) => _MessageCopyWithImpl<$R, $Out>(v, t, t2)); } abstract class MessageCopyWith<$R, $In extends Message, $Out> implements ClassCopyWith<$R, $In, $Out> { $R call({String? id, String? message, String? author}); MessageCopyWith<$R2, $In, $Out2> $chain<$R2, $Out2>(Then<$Out2, $R2> t); } class _MessageCopyWithImpl<$R, $Out> extends ClassCopyWithBase<$R, Message, $Out> implements MessageCopyWith<$R, Message, $Out> { _MessageCopyWithImpl(super.value, super.then, super.then2); @override late final ClassMapperBase $mapper = MessageMapper.ensureInitialized(); @override $R call({String? id, String? message, String? author}) => $apply( FieldCopyWithData({ if (id != null) #id: id, if (message != null) #message: message, if (author != null) #author: author, }), ); @override Message $make(CopyWithData data) => Message( id: data.get(#id, or: $value.id), message: data.get(#message, or: $value.message), author: data.get(#author, or: $value.author), ); @override MessageCopyWith<$R2, Message, $Out2> $chain<$R2, $Out2>(Then<$Out2, $R2> t) => _MessageCopyWithImpl<$R2, $Out2>($value, $cast, t); }