veilidchat/lib/chat/models/message_state.freezed.dart

246 lines
8.6 KiB
Dart
Raw Normal View History

2024-04-17 21:31:26 -04:00
// 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 'message_state.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');
MessageState _$MessageStateFromJson(Map<String, dynamic> json) {
return _MessageState.fromJson(json);
}
/// @nodoc
mixin _$MessageState {
2024-05-25 22:46:43 -04:00
// Content of the message
2024-06-02 11:04:19 -04:00
@JsonKey(fromJson: messageFromJson, toJson: messageToJson)
2024-05-25 22:46:43 -04:00
proto.Message get content =>
2024-05-29 10:47:43 -04:00
throw _privateConstructorUsedError; // Sent timestamp
Timestamp get sentTimestamp =>
throw _privateConstructorUsedError; // Reconciled timestamp
Timestamp? get reconciledTimestamp =>
2024-05-27 18:04:00 -04:00
throw _privateConstructorUsedError; // The state of the message
2024-04-17 21:31:26 -04:00
MessageSendState? get sendState => throw _privateConstructorUsedError;
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
@JsonKey(ignore: true)
$MessageStateCopyWith<MessageState> get copyWith =>
throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $MessageStateCopyWith<$Res> {
factory $MessageStateCopyWith(
MessageState value, $Res Function(MessageState) then) =
_$MessageStateCopyWithImpl<$Res, MessageState>;
@useResult
$Res call(
2024-06-02 11:04:19 -04:00
{@JsonKey(fromJson: messageFromJson, toJson: messageToJson)
2024-05-25 22:46:43 -04:00
proto.Message content,
2024-05-29 10:47:43 -04:00
Timestamp sentTimestamp,
Timestamp? reconciledTimestamp,
2024-04-17 21:31:26 -04:00
MessageSendState? sendState});
}
/// @nodoc
class _$MessageStateCopyWithImpl<$Res, $Val extends MessageState>
implements $MessageStateCopyWith<$Res> {
_$MessageStateCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
@pragma('vm:prefer-inline')
@override
$Res call({
2024-05-25 22:46:43 -04:00
Object? content = null,
2024-05-29 10:47:43 -04:00
Object? sentTimestamp = null,
Object? reconciledTimestamp = freezed,
2024-04-17 21:31:26 -04:00
Object? sendState = freezed,
}) {
return _then(_value.copyWith(
2024-05-25 22:46:43 -04:00
content: null == content
? _value.content
: content // ignore: cast_nullable_to_non_nullable
as proto.Message,
2024-05-29 10:47:43 -04:00
sentTimestamp: null == sentTimestamp
? _value.sentTimestamp
: sentTimestamp // ignore: cast_nullable_to_non_nullable
2024-04-17 21:31:26 -04:00
as Timestamp,
2024-05-29 10:47:43 -04:00
reconciledTimestamp: freezed == reconciledTimestamp
? _value.reconciledTimestamp
: reconciledTimestamp // ignore: cast_nullable_to_non_nullable
as Timestamp?,
2024-04-17 21:31:26 -04:00
sendState: freezed == sendState
? _value.sendState
: sendState // ignore: cast_nullable_to_non_nullable
as MessageSendState?,
) as $Val);
}
}
/// @nodoc
abstract class _$$MessageStateImplCopyWith<$Res>
implements $MessageStateCopyWith<$Res> {
factory _$$MessageStateImplCopyWith(
_$MessageStateImpl value, $Res Function(_$MessageStateImpl) then) =
__$$MessageStateImplCopyWithImpl<$Res>;
@override
@useResult
$Res call(
2024-06-02 11:04:19 -04:00
{@JsonKey(fromJson: messageFromJson, toJson: messageToJson)
2024-05-25 22:46:43 -04:00
proto.Message content,
2024-05-29 10:47:43 -04:00
Timestamp sentTimestamp,
Timestamp? reconciledTimestamp,
2024-04-17 21:31:26 -04:00
MessageSendState? sendState});
}
/// @nodoc
class __$$MessageStateImplCopyWithImpl<$Res>
extends _$MessageStateCopyWithImpl<$Res, _$MessageStateImpl>
implements _$$MessageStateImplCopyWith<$Res> {
__$$MessageStateImplCopyWithImpl(
_$MessageStateImpl _value, $Res Function(_$MessageStateImpl) _then)
: super(_value, _then);
@pragma('vm:prefer-inline')
@override
$Res call({
2024-05-25 22:46:43 -04:00
Object? content = null,
2024-05-29 10:47:43 -04:00
Object? sentTimestamp = null,
Object? reconciledTimestamp = freezed,
2024-04-17 21:31:26 -04:00
Object? sendState = freezed,
}) {
return _then(_$MessageStateImpl(
2024-05-25 22:46:43 -04:00
content: null == content
? _value.content
: content // ignore: cast_nullable_to_non_nullable
as proto.Message,
2024-05-29 10:47:43 -04:00
sentTimestamp: null == sentTimestamp
? _value.sentTimestamp
: sentTimestamp // ignore: cast_nullable_to_non_nullable
2024-04-17 21:31:26 -04:00
as Timestamp,
2024-05-29 10:47:43 -04:00
reconciledTimestamp: freezed == reconciledTimestamp
? _value.reconciledTimestamp
: reconciledTimestamp // ignore: cast_nullable_to_non_nullable
as Timestamp?,
2024-04-17 21:31:26 -04:00
sendState: freezed == sendState
? _value.sendState
: sendState // ignore: cast_nullable_to_non_nullable
as MessageSendState?,
));
}
}
/// @nodoc
@JsonSerializable()
class _$MessageStateImpl with DiagnosticableTreeMixin implements _MessageState {
const _$MessageStateImpl(
2024-06-02 11:04:19 -04:00
{@JsonKey(fromJson: messageFromJson, toJson: messageToJson)
2024-05-25 22:46:43 -04:00
required this.content,
2024-05-29 10:47:43 -04:00
required this.sentTimestamp,
required this.reconciledTimestamp,
2024-04-17 21:31:26 -04:00
required this.sendState});
factory _$MessageStateImpl.fromJson(Map<String, dynamic> json) =>
_$$MessageStateImplFromJson(json);
2024-05-25 22:46:43 -04:00
// Content of the message
2024-04-17 21:31:26 -04:00
@override
2024-06-02 11:04:19 -04:00
@JsonKey(fromJson: messageFromJson, toJson: messageToJson)
2024-05-25 22:46:43 -04:00
final proto.Message content;
2024-05-29 10:47:43 -04:00
// Sent timestamp
2024-04-17 21:31:26 -04:00
@override
2024-05-29 10:47:43 -04:00
final Timestamp sentTimestamp;
// Reconciled timestamp
@override
final Timestamp? reconciledTimestamp;
2024-05-27 18:04:00 -04:00
// The state of the message
2024-04-17 21:31:26 -04:00
@override
final MessageSendState? sendState;
@override
String toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) {
2024-05-29 10:47:43 -04:00
return 'MessageState(content: $content, sentTimestamp: $sentTimestamp, reconciledTimestamp: $reconciledTimestamp, sendState: $sendState)';
2024-04-17 21:31:26 -04:00
}
@override
void debugFillProperties(DiagnosticPropertiesBuilder properties) {
super.debugFillProperties(properties);
properties
..add(DiagnosticsProperty('type', 'MessageState'))
2024-05-25 22:46:43 -04:00
..add(DiagnosticsProperty('content', content))
2024-05-29 10:47:43 -04:00
..add(DiagnosticsProperty('sentTimestamp', sentTimestamp))
..add(DiagnosticsProperty('reconciledTimestamp', reconciledTimestamp))
2024-04-17 21:31:26 -04:00
..add(DiagnosticsProperty('sendState', sendState));
}
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$MessageStateImpl &&
2024-05-25 22:46:43 -04:00
(identical(other.content, content) || other.content == content) &&
2024-05-29 10:47:43 -04:00
(identical(other.sentTimestamp, sentTimestamp) ||
other.sentTimestamp == sentTimestamp) &&
(identical(other.reconciledTimestamp, reconciledTimestamp) ||
other.reconciledTimestamp == reconciledTimestamp) &&
2024-04-17 21:31:26 -04:00
(identical(other.sendState, sendState) ||
other.sendState == sendState));
}
@JsonKey(ignore: true)
@override
2024-05-29 10:47:43 -04:00
int get hashCode => Object.hash(
runtimeType, content, sentTimestamp, reconciledTimestamp, sendState);
2024-04-17 21:31:26 -04:00
@JsonKey(ignore: true)
@override
@pragma('vm:prefer-inline')
_$$MessageStateImplCopyWith<_$MessageStateImpl> get copyWith =>
__$$MessageStateImplCopyWithImpl<_$MessageStateImpl>(this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$$MessageStateImplToJson(
this,
);
}
}
abstract class _MessageState implements MessageState {
const factory _MessageState(
2024-06-02 11:04:19 -04:00
{@JsonKey(fromJson: messageFromJson, toJson: messageToJson)
2024-05-25 22:46:43 -04:00
required final proto.Message content,
2024-05-29 10:47:43 -04:00
required final Timestamp sentTimestamp,
required final Timestamp? reconciledTimestamp,
2024-04-17 21:31:26 -04:00
required final MessageSendState? sendState}) = _$MessageStateImpl;
factory _MessageState.fromJson(Map<String, dynamic> json) =
_$MessageStateImpl.fromJson;
2024-05-25 22:46:43 -04:00
@override // Content of the message
2024-06-02 11:04:19 -04:00
@JsonKey(fromJson: messageFromJson, toJson: messageToJson)
2024-05-25 22:46:43 -04:00
proto.Message get content;
2024-05-29 10:47:43 -04:00
@override // Sent timestamp
Timestamp get sentTimestamp;
@override // Reconciled timestamp
Timestamp? get reconciledTimestamp;
2024-05-27 18:04:00 -04:00
@override // The state of the message
2024-04-17 21:31:26 -04:00
MessageSendState? get sendState;
@override
@JsonKey(ignore: true)
_$$MessageStateImplCopyWith<_$MessageStateImpl> get copyWith =>
throw _privateConstructorUsedError;
}