veilidchat/lib/account_manager/models/user_login/user_login.freezed.dart
2025-03-22 21:43:37 -04:00

258 lines
9.2 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 'user_login.dart';
// **************************************************************************
// FreezedGenerator
// **************************************************************************
// dart format off
T _$identity<T>(T value) => value;
/// @nodoc
mixin _$UserLogin {
// SuperIdentity record key for the user
// used to index the local accounts table
TypedKey
get superIdentityRecordKey; // The identity secret as unlocked from the local accounts table
TypedSecret
get identitySecret; // The account record key, owner key and secret pulled from the identity
AccountRecordInfo
get accountRecordInfo; // The time this login was most recently used
Timestamp get lastActive;
/// Create a copy of UserLogin
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
$UserLoginCopyWith<UserLogin> get copyWith =>
_$UserLoginCopyWithImpl<UserLogin>(this as UserLogin, _$identity);
/// Serializes this UserLogin to a JSON map.
Map<String, dynamic> toJson();
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is UserLogin &&
(identical(other.superIdentityRecordKey, superIdentityRecordKey) ||
other.superIdentityRecordKey == superIdentityRecordKey) &&
(identical(other.identitySecret, identitySecret) ||
other.identitySecret == identitySecret) &&
(identical(other.accountRecordInfo, accountRecordInfo) ||
other.accountRecordInfo == accountRecordInfo) &&
(identical(other.lastActive, lastActive) ||
other.lastActive == lastActive));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType, superIdentityRecordKey,
identitySecret, accountRecordInfo, lastActive);
@override
String toString() {
return 'UserLogin(superIdentityRecordKey: $superIdentityRecordKey, identitySecret: $identitySecret, accountRecordInfo: $accountRecordInfo, lastActive: $lastActive)';
}
}
/// @nodoc
abstract mixin class $UserLoginCopyWith<$Res> {
factory $UserLoginCopyWith(UserLogin value, $Res Function(UserLogin) _then) =
_$UserLoginCopyWithImpl;
@useResult
$Res call(
{Typed<FixedEncodedString43> superIdentityRecordKey,
Typed<FixedEncodedString43> identitySecret,
AccountRecordInfo accountRecordInfo,
Timestamp lastActive});
$AccountRecordInfoCopyWith<$Res> get accountRecordInfo;
}
/// @nodoc
class _$UserLoginCopyWithImpl<$Res> implements $UserLoginCopyWith<$Res> {
_$UserLoginCopyWithImpl(this._self, this._then);
final UserLogin _self;
final $Res Function(UserLogin) _then;
/// Create a copy of UserLogin
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Object? superIdentityRecordKey = null,
Object? identitySecret = null,
Object? accountRecordInfo = null,
Object? lastActive = null,
}) {
return _then(_self.copyWith(
superIdentityRecordKey: null == superIdentityRecordKey
? _self.superIdentityRecordKey!
: superIdentityRecordKey // ignore: cast_nullable_to_non_nullable
as Typed<FixedEncodedString43>,
identitySecret: null == identitySecret
? _self.identitySecret!
: identitySecret // ignore: cast_nullable_to_non_nullable
as Typed<FixedEncodedString43>,
accountRecordInfo: null == accountRecordInfo
? _self.accountRecordInfo
: accountRecordInfo // ignore: cast_nullable_to_non_nullable
as AccountRecordInfo,
lastActive: null == lastActive
? _self.lastActive
: lastActive // ignore: cast_nullable_to_non_nullable
as Timestamp,
));
}
/// Create a copy of UserLogin
/// with the given fields replaced by the non-null parameter values.
@override
@pragma('vm:prefer-inline')
$AccountRecordInfoCopyWith<$Res> get accountRecordInfo {
return $AccountRecordInfoCopyWith<$Res>(_self.accountRecordInfo, (value) {
return _then(_self.copyWith(accountRecordInfo: value));
});
}
}
/// @nodoc
@JsonSerializable()
class _UserLogin implements UserLogin {
const _UserLogin(
{required this.superIdentityRecordKey,
required this.identitySecret,
required this.accountRecordInfo,
required this.lastActive});
factory _UserLogin.fromJson(Map<String, dynamic> json) =>
_$UserLoginFromJson(json);
// SuperIdentity record key for the user
// used to index the local accounts table
@override
final Typed<FixedEncodedString43> superIdentityRecordKey;
// The identity secret as unlocked from the local accounts table
@override
final Typed<FixedEncodedString43> identitySecret;
// The account record key, owner key and secret pulled from the identity
@override
final AccountRecordInfo accountRecordInfo;
// The time this login was most recently used
@override
final Timestamp lastActive;
/// Create a copy of UserLogin
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
_$UserLoginCopyWith<_UserLogin> get copyWith =>
__$UserLoginCopyWithImpl<_UserLogin>(this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$UserLoginToJson(
this,
);
}
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _UserLogin &&
(identical(other.superIdentityRecordKey, superIdentityRecordKey) ||
other.superIdentityRecordKey == superIdentityRecordKey) &&
(identical(other.identitySecret, identitySecret) ||
other.identitySecret == identitySecret) &&
(identical(other.accountRecordInfo, accountRecordInfo) ||
other.accountRecordInfo == accountRecordInfo) &&
(identical(other.lastActive, lastActive) ||
other.lastActive == lastActive));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType, superIdentityRecordKey,
identitySecret, accountRecordInfo, lastActive);
@override
String toString() {
return 'UserLogin(superIdentityRecordKey: $superIdentityRecordKey, identitySecret: $identitySecret, accountRecordInfo: $accountRecordInfo, lastActive: $lastActive)';
}
}
/// @nodoc
abstract mixin class _$UserLoginCopyWith<$Res>
implements $UserLoginCopyWith<$Res> {
factory _$UserLoginCopyWith(
_UserLogin value, $Res Function(_UserLogin) _then) =
__$UserLoginCopyWithImpl;
@override
@useResult
$Res call(
{Typed<FixedEncodedString43> superIdentityRecordKey,
Typed<FixedEncodedString43> identitySecret,
AccountRecordInfo accountRecordInfo,
Timestamp lastActive});
@override
$AccountRecordInfoCopyWith<$Res> get accountRecordInfo;
}
/// @nodoc
class __$UserLoginCopyWithImpl<$Res> implements _$UserLoginCopyWith<$Res> {
__$UserLoginCopyWithImpl(this._self, this._then);
final _UserLogin _self;
final $Res Function(_UserLogin) _then;
/// Create a copy of UserLogin
/// with the given fields replaced by the non-null parameter values.
@override
@pragma('vm:prefer-inline')
$Res call({
Object? superIdentityRecordKey = null,
Object? identitySecret = null,
Object? accountRecordInfo = null,
Object? lastActive = null,
}) {
return _then(_UserLogin(
superIdentityRecordKey: null == superIdentityRecordKey
? _self.superIdentityRecordKey
: superIdentityRecordKey // ignore: cast_nullable_to_non_nullable
as Typed<FixedEncodedString43>,
identitySecret: null == identitySecret
? _self.identitySecret
: identitySecret // ignore: cast_nullable_to_non_nullable
as Typed<FixedEncodedString43>,
accountRecordInfo: null == accountRecordInfo
? _self.accountRecordInfo
: accountRecordInfo // ignore: cast_nullable_to_non_nullable
as AccountRecordInfo,
lastActive: null == lastActive
? _self.lastActive
: lastActive // ignore: cast_nullable_to_non_nullable
as Timestamp,
));
}
/// Create a copy of UserLogin
/// with the given fields replaced by the non-null parameter values.
@override
@pragma('vm:prefer-inline')
$AccountRecordInfoCopyWith<$Res> get accountRecordInfo {
return $AccountRecordInfoCopyWith<$Res>(_self.accountRecordInfo, (value) {
return _then(_self.copyWith(accountRecordInfo: value));
});
}
}
// dart format on