mirror of
https://gitlab.com/veilid/veilidchat.git
synced 2025-04-26 01:59:11 -04:00
255 lines
8.8 KiB
Dart
255 lines
8.8 KiB
Dart
// dart format width=80
|
|
// 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
|
|
// **************************************************************************
|
|
|
|
// dart format off
|
|
T _$identity<T>(T value) => value;
|
|
|
|
/// @nodoc
|
|
mixin _$MessageState implements DiagnosticableTreeMixin {
|
|
// Content of the message
|
|
@JsonKey(fromJson: messageFromJson, toJson: messageToJson)
|
|
proto.Message get content; // Sent timestamp
|
|
Timestamp get sentTimestamp; // Reconciled timestamp
|
|
Timestamp? get reconciledTimestamp; // The state of the message
|
|
MessageSendState? get sendState;
|
|
|
|
/// Create a copy of MessageState
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
@pragma('vm:prefer-inline')
|
|
$MessageStateCopyWith<MessageState> get copyWith =>
|
|
_$MessageStateCopyWithImpl<MessageState>(
|
|
this as MessageState, _$identity);
|
|
|
|
/// Serializes this MessageState to a JSON map.
|
|
Map<String, dynamic> toJson();
|
|
|
|
@override
|
|
void debugFillProperties(DiagnosticPropertiesBuilder properties) {
|
|
properties
|
|
..add(DiagnosticsProperty('type', 'MessageState'))
|
|
..add(DiagnosticsProperty('content', content))
|
|
..add(DiagnosticsProperty('sentTimestamp', sentTimestamp))
|
|
..add(DiagnosticsProperty('reconciledTimestamp', reconciledTimestamp))
|
|
..add(DiagnosticsProperty('sendState', sendState));
|
|
}
|
|
|
|
@override
|
|
bool operator ==(Object other) {
|
|
return identical(this, other) ||
|
|
(other.runtimeType == runtimeType &&
|
|
other is MessageState &&
|
|
(identical(other.content, content) || other.content == content) &&
|
|
(identical(other.sentTimestamp, sentTimestamp) ||
|
|
other.sentTimestamp == sentTimestamp) &&
|
|
(identical(other.reconciledTimestamp, reconciledTimestamp) ||
|
|
other.reconciledTimestamp == reconciledTimestamp) &&
|
|
(identical(other.sendState, sendState) ||
|
|
other.sendState == sendState));
|
|
}
|
|
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
@override
|
|
int get hashCode => Object.hash(
|
|
runtimeType, content, sentTimestamp, reconciledTimestamp, sendState);
|
|
|
|
@override
|
|
String toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) {
|
|
return 'MessageState(content: $content, sentTimestamp: $sentTimestamp, reconciledTimestamp: $reconciledTimestamp, sendState: $sendState)';
|
|
}
|
|
}
|
|
|
|
/// @nodoc
|
|
abstract mixin class $MessageStateCopyWith<$Res> {
|
|
factory $MessageStateCopyWith(
|
|
MessageState value, $Res Function(MessageState) _then) =
|
|
_$MessageStateCopyWithImpl;
|
|
@useResult
|
|
$Res call(
|
|
{@JsonKey(fromJson: messageFromJson, toJson: messageToJson)
|
|
proto.Message content,
|
|
Timestamp sentTimestamp,
|
|
Timestamp? reconciledTimestamp,
|
|
MessageSendState? sendState});
|
|
}
|
|
|
|
/// @nodoc
|
|
class _$MessageStateCopyWithImpl<$Res> implements $MessageStateCopyWith<$Res> {
|
|
_$MessageStateCopyWithImpl(this._self, this._then);
|
|
|
|
final MessageState _self;
|
|
final $Res Function(MessageState) _then;
|
|
|
|
/// Create a copy of MessageState
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@pragma('vm:prefer-inline')
|
|
@override
|
|
$Res call({
|
|
Object? content = null,
|
|
Object? sentTimestamp = null,
|
|
Object? reconciledTimestamp = freezed,
|
|
Object? sendState = freezed,
|
|
}) {
|
|
return _then(_self.copyWith(
|
|
content: null == content
|
|
? _self.content
|
|
: content // ignore: cast_nullable_to_non_nullable
|
|
as proto.Message,
|
|
sentTimestamp: null == sentTimestamp
|
|
? _self.sentTimestamp
|
|
: sentTimestamp // ignore: cast_nullable_to_non_nullable
|
|
as Timestamp,
|
|
reconciledTimestamp: freezed == reconciledTimestamp
|
|
? _self.reconciledTimestamp
|
|
: reconciledTimestamp // ignore: cast_nullable_to_non_nullable
|
|
as Timestamp?,
|
|
sendState: freezed == sendState
|
|
? _self.sendState
|
|
: sendState // ignore: cast_nullable_to_non_nullable
|
|
as MessageSendState?,
|
|
));
|
|
}
|
|
}
|
|
|
|
/// @nodoc
|
|
@JsonSerializable()
|
|
class _MessageState with DiagnosticableTreeMixin implements MessageState {
|
|
const _MessageState(
|
|
{@JsonKey(fromJson: messageFromJson, toJson: messageToJson)
|
|
required this.content,
|
|
required this.sentTimestamp,
|
|
required this.reconciledTimestamp,
|
|
required this.sendState});
|
|
factory _MessageState.fromJson(Map<String, dynamic> json) =>
|
|
_$MessageStateFromJson(json);
|
|
|
|
// Content of the message
|
|
@override
|
|
@JsonKey(fromJson: messageFromJson, toJson: messageToJson)
|
|
final proto.Message content;
|
|
// Sent timestamp
|
|
@override
|
|
final Timestamp sentTimestamp;
|
|
// Reconciled timestamp
|
|
@override
|
|
final Timestamp? reconciledTimestamp;
|
|
// The state of the message
|
|
@override
|
|
final MessageSendState? sendState;
|
|
|
|
/// Create a copy of MessageState
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@override
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
@pragma('vm:prefer-inline')
|
|
_$MessageStateCopyWith<_MessageState> get copyWith =>
|
|
__$MessageStateCopyWithImpl<_MessageState>(this, _$identity);
|
|
|
|
@override
|
|
Map<String, dynamic> toJson() {
|
|
return _$MessageStateToJson(
|
|
this,
|
|
);
|
|
}
|
|
|
|
@override
|
|
void debugFillProperties(DiagnosticPropertiesBuilder properties) {
|
|
properties
|
|
..add(DiagnosticsProperty('type', 'MessageState'))
|
|
..add(DiagnosticsProperty('content', content))
|
|
..add(DiagnosticsProperty('sentTimestamp', sentTimestamp))
|
|
..add(DiagnosticsProperty('reconciledTimestamp', reconciledTimestamp))
|
|
..add(DiagnosticsProperty('sendState', sendState));
|
|
}
|
|
|
|
@override
|
|
bool operator ==(Object other) {
|
|
return identical(this, other) ||
|
|
(other.runtimeType == runtimeType &&
|
|
other is _MessageState &&
|
|
(identical(other.content, content) || other.content == content) &&
|
|
(identical(other.sentTimestamp, sentTimestamp) ||
|
|
other.sentTimestamp == sentTimestamp) &&
|
|
(identical(other.reconciledTimestamp, reconciledTimestamp) ||
|
|
other.reconciledTimestamp == reconciledTimestamp) &&
|
|
(identical(other.sendState, sendState) ||
|
|
other.sendState == sendState));
|
|
}
|
|
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
@override
|
|
int get hashCode => Object.hash(
|
|
runtimeType, content, sentTimestamp, reconciledTimestamp, sendState);
|
|
|
|
@override
|
|
String toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) {
|
|
return 'MessageState(content: $content, sentTimestamp: $sentTimestamp, reconciledTimestamp: $reconciledTimestamp, sendState: $sendState)';
|
|
}
|
|
}
|
|
|
|
/// @nodoc
|
|
abstract mixin class _$MessageStateCopyWith<$Res>
|
|
implements $MessageStateCopyWith<$Res> {
|
|
factory _$MessageStateCopyWith(
|
|
_MessageState value, $Res Function(_MessageState) _then) =
|
|
__$MessageStateCopyWithImpl;
|
|
@override
|
|
@useResult
|
|
$Res call(
|
|
{@JsonKey(fromJson: messageFromJson, toJson: messageToJson)
|
|
proto.Message content,
|
|
Timestamp sentTimestamp,
|
|
Timestamp? reconciledTimestamp,
|
|
MessageSendState? sendState});
|
|
}
|
|
|
|
/// @nodoc
|
|
class __$MessageStateCopyWithImpl<$Res>
|
|
implements _$MessageStateCopyWith<$Res> {
|
|
__$MessageStateCopyWithImpl(this._self, this._then);
|
|
|
|
final _MessageState _self;
|
|
final $Res Function(_MessageState) _then;
|
|
|
|
/// Create a copy of MessageState
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@override
|
|
@pragma('vm:prefer-inline')
|
|
$Res call({
|
|
Object? content = null,
|
|
Object? sentTimestamp = null,
|
|
Object? reconciledTimestamp = freezed,
|
|
Object? sendState = freezed,
|
|
}) {
|
|
return _then(_MessageState(
|
|
content: null == content
|
|
? _self.content
|
|
: content // ignore: cast_nullable_to_non_nullable
|
|
as proto.Message,
|
|
sentTimestamp: null == sentTimestamp
|
|
? _self.sentTimestamp
|
|
: sentTimestamp // ignore: cast_nullable_to_non_nullable
|
|
as Timestamp,
|
|
reconciledTimestamp: freezed == reconciledTimestamp
|
|
? _self.reconciledTimestamp
|
|
: reconciledTimestamp // ignore: cast_nullable_to_non_nullable
|
|
as Timestamp?,
|
|
sendState: freezed == sendState
|
|
? _self.sendState
|
|
: sendState // ignore: cast_nullable_to_non_nullable
|
|
as MessageSendState?,
|
|
));
|
|
}
|
|
}
|
|
|
|
// dart format on
|