veilidchat/lib/entities/local_account.freezed.dart

302 lines
11 KiB
Dart
Raw Normal View History

2023-07-07 19:33:28 -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 'local_account.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#custom-getters-and-methods');
LocalAccount _$LocalAccountFromJson(Map<String, dynamic> json) {
return _LocalAccount.fromJson(json);
}
/// @nodoc
mixin _$LocalAccount {
// The master key record for the account, containing the identityPublicKey
IdentityMaster get identityMaster =>
2023-08-01 00:39:50 -04:00
throw _privateConstructorUsedError; // The encrypted identity secret that goes with
// the identityPublicKey with appended salt
2023-07-07 19:33:28 -04:00
@Uint8ListJsonConverter()
2023-08-01 00:39:50 -04:00
Uint8List get identitySecretBytes =>
2023-07-07 19:33:28 -04:00
throw _privateConstructorUsedError; // The kind of encryption input used on the account
EncryptionKeyType get encryptionKeyType =>
throw _privateConstructorUsedError; // If account is not hidden, password can be retrieved via
bool get biometricsEnabled =>
throw _privateConstructorUsedError; // Keep account hidden unless account password is entered
// (tries all hidden accounts with auth method (no biometrics))
2023-07-28 20:36:05 -04:00
bool get hiddenAccount =>
throw _privateConstructorUsedError; // Display name for account until it is unlocked
String get name => throw _privateConstructorUsedError;
2023-07-07 19:33:28 -04:00
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
@JsonKey(ignore: true)
$LocalAccountCopyWith<LocalAccount> get copyWith =>
throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $LocalAccountCopyWith<$Res> {
factory $LocalAccountCopyWith(
LocalAccount value, $Res Function(LocalAccount) then) =
_$LocalAccountCopyWithImpl<$Res, LocalAccount>;
@useResult
$Res call(
{IdentityMaster identityMaster,
2023-08-01 00:39:50 -04:00
@Uint8ListJsonConverter() Uint8List identitySecretBytes,
2023-07-07 19:33:28 -04:00
EncryptionKeyType encryptionKeyType,
bool biometricsEnabled,
2023-07-28 20:36:05 -04:00
bool hiddenAccount,
String name});
2023-07-07 19:33:28 -04:00
$IdentityMasterCopyWith<$Res> get identityMaster;
}
/// @nodoc
class _$LocalAccountCopyWithImpl<$Res, $Val extends LocalAccount>
implements $LocalAccountCopyWith<$Res> {
_$LocalAccountCopyWithImpl(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({
Object? identityMaster = null,
2023-08-01 00:39:50 -04:00
Object? identitySecretBytes = null,
2023-07-07 19:33:28 -04:00
Object? encryptionKeyType = null,
Object? biometricsEnabled = null,
Object? hiddenAccount = null,
2023-07-28 20:36:05 -04:00
Object? name = null,
2023-07-07 19:33:28 -04:00
}) {
return _then(_value.copyWith(
identityMaster: null == identityMaster
? _value.identityMaster
: identityMaster // ignore: cast_nullable_to_non_nullable
as IdentityMaster,
2023-08-01 00:39:50 -04:00
identitySecretBytes: null == identitySecretBytes
? _value.identitySecretBytes
: identitySecretBytes // ignore: cast_nullable_to_non_nullable
2023-07-16 21:41:40 -04:00
as Uint8List,
2023-07-07 19:33:28 -04:00
encryptionKeyType: null == encryptionKeyType
? _value.encryptionKeyType
: encryptionKeyType // ignore: cast_nullable_to_non_nullable
as EncryptionKeyType,
biometricsEnabled: null == biometricsEnabled
? _value.biometricsEnabled
: biometricsEnabled // ignore: cast_nullable_to_non_nullable
as bool,
hiddenAccount: null == hiddenAccount
? _value.hiddenAccount
: hiddenAccount // ignore: cast_nullable_to_non_nullable
as bool,
2023-07-28 20:36:05 -04:00
name: null == name
? _value.name
: name // ignore: cast_nullable_to_non_nullable
as String,
2023-07-07 19:33:28 -04:00
) as $Val);
}
@override
@pragma('vm:prefer-inline')
$IdentityMasterCopyWith<$Res> get identityMaster {
return $IdentityMasterCopyWith<$Res>(_value.identityMaster, (value) {
return _then(_value.copyWith(identityMaster: value) as $Val);
});
}
}
/// @nodoc
2023-09-28 10:06:22 -04:00
abstract class _$$LocalAccountImplCopyWith<$Res>
2023-07-07 19:33:28 -04:00
implements $LocalAccountCopyWith<$Res> {
2023-09-28 10:06:22 -04:00
factory _$$LocalAccountImplCopyWith(
_$LocalAccountImpl value, $Res Function(_$LocalAccountImpl) then) =
__$$LocalAccountImplCopyWithImpl<$Res>;
2023-07-07 19:33:28 -04:00
@override
@useResult
$Res call(
{IdentityMaster identityMaster,
2023-08-01 00:39:50 -04:00
@Uint8ListJsonConverter() Uint8List identitySecretBytes,
2023-07-07 19:33:28 -04:00
EncryptionKeyType encryptionKeyType,
bool biometricsEnabled,
2023-07-28 20:36:05 -04:00
bool hiddenAccount,
String name});
2023-07-07 19:33:28 -04:00
@override
$IdentityMasterCopyWith<$Res> get identityMaster;
}
/// @nodoc
2023-09-28 10:06:22 -04:00
class __$$LocalAccountImplCopyWithImpl<$Res>
extends _$LocalAccountCopyWithImpl<$Res, _$LocalAccountImpl>
implements _$$LocalAccountImplCopyWith<$Res> {
__$$LocalAccountImplCopyWithImpl(
_$LocalAccountImpl _value, $Res Function(_$LocalAccountImpl) _then)
2023-07-07 19:33:28 -04:00
: super(_value, _then);
@pragma('vm:prefer-inline')
@override
$Res call({
Object? identityMaster = null,
2023-08-01 00:39:50 -04:00
Object? identitySecretBytes = null,
2023-07-07 19:33:28 -04:00
Object? encryptionKeyType = null,
Object? biometricsEnabled = null,
Object? hiddenAccount = null,
2023-07-28 20:36:05 -04:00
Object? name = null,
2023-07-07 19:33:28 -04:00
}) {
2023-09-28 10:06:22 -04:00
return _then(_$LocalAccountImpl(
2023-07-07 19:33:28 -04:00
identityMaster: null == identityMaster
? _value.identityMaster
: identityMaster // ignore: cast_nullable_to_non_nullable
as IdentityMaster,
2023-08-01 00:39:50 -04:00
identitySecretBytes: null == identitySecretBytes
? _value.identitySecretBytes
: identitySecretBytes // ignore: cast_nullable_to_non_nullable
2023-07-16 21:41:40 -04:00
as Uint8List,
2023-07-07 19:33:28 -04:00
encryptionKeyType: null == encryptionKeyType
? _value.encryptionKeyType
: encryptionKeyType // ignore: cast_nullable_to_non_nullable
as EncryptionKeyType,
biometricsEnabled: null == biometricsEnabled
? _value.biometricsEnabled
: biometricsEnabled // ignore: cast_nullable_to_non_nullable
as bool,
hiddenAccount: null == hiddenAccount
? _value.hiddenAccount
: hiddenAccount // ignore: cast_nullable_to_non_nullable
as bool,
2023-07-28 20:36:05 -04:00
name: null == name
? _value.name
: name // ignore: cast_nullable_to_non_nullable
as String,
2023-07-07 19:33:28 -04:00
));
}
}
/// @nodoc
@JsonSerializable()
2023-09-28 10:06:22 -04:00
class _$LocalAccountImpl implements _LocalAccount {
const _$LocalAccountImpl(
2023-07-07 19:33:28 -04:00
{required this.identityMaster,
2023-08-01 00:39:50 -04:00
@Uint8ListJsonConverter() required this.identitySecretBytes,
2023-07-07 19:33:28 -04:00
required this.encryptionKeyType,
required this.biometricsEnabled,
2023-07-28 20:36:05 -04:00
required this.hiddenAccount,
required this.name});
2023-07-07 19:33:28 -04:00
2023-09-28 10:06:22 -04:00
factory _$LocalAccountImpl.fromJson(Map<String, dynamic> json) =>
_$$LocalAccountImplFromJson(json);
2023-07-07 19:33:28 -04:00
// The master key record for the account, containing the identityPublicKey
@override
final IdentityMaster identityMaster;
2023-08-01 00:39:50 -04:00
// The encrypted identity secret that goes with
// the identityPublicKey with appended salt
2023-07-07 19:33:28 -04:00
@override
@Uint8ListJsonConverter()
2023-08-01 00:39:50 -04:00
final Uint8List identitySecretBytes;
2023-07-07 19:33:28 -04:00
// The kind of encryption input used on the account
@override
final EncryptionKeyType encryptionKeyType;
// If account is not hidden, password can be retrieved via
@override
final bool biometricsEnabled;
// Keep account hidden unless account password is entered
// (tries all hidden accounts with auth method (no biometrics))
@override
final bool hiddenAccount;
2023-07-28 20:36:05 -04:00
// Display name for account until it is unlocked
@override
final String name;
2023-07-07 19:33:28 -04:00
@override
String toString() {
2023-08-01 00:39:50 -04:00
return 'LocalAccount(identityMaster: $identityMaster, identitySecretBytes: $identitySecretBytes, encryptionKeyType: $encryptionKeyType, biometricsEnabled: $biometricsEnabled, hiddenAccount: $hiddenAccount, name: $name)';
2023-07-07 19:33:28 -04:00
}
@override
bool operator ==(dynamic other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
2023-09-28 10:06:22 -04:00
other is _$LocalAccountImpl &&
2023-07-07 19:33:28 -04:00
(identical(other.identityMaster, identityMaster) ||
other.identityMaster == identityMaster) &&
const DeepCollectionEquality()
2023-08-01 00:39:50 -04:00
.equals(other.identitySecretBytes, identitySecretBytes) &&
2023-07-07 19:33:28 -04:00
(identical(other.encryptionKeyType, encryptionKeyType) ||
other.encryptionKeyType == encryptionKeyType) &&
(identical(other.biometricsEnabled, biometricsEnabled) ||
other.biometricsEnabled == biometricsEnabled) &&
(identical(other.hiddenAccount, hiddenAccount) ||
2023-07-28 20:36:05 -04:00
other.hiddenAccount == hiddenAccount) &&
(identical(other.name, name) || other.name == name));
2023-07-07 19:33:28 -04:00
}
@JsonKey(ignore: true)
@override
int get hashCode => Object.hash(
runtimeType,
identityMaster,
2023-08-01 00:39:50 -04:00
const DeepCollectionEquality().hash(identitySecretBytes),
2023-07-07 19:33:28 -04:00
encryptionKeyType,
biometricsEnabled,
2023-07-28 20:36:05 -04:00
hiddenAccount,
name);
2023-07-07 19:33:28 -04:00
@JsonKey(ignore: true)
@override
@pragma('vm:prefer-inline')
2023-09-28 10:06:22 -04:00
_$$LocalAccountImplCopyWith<_$LocalAccountImpl> get copyWith =>
__$$LocalAccountImplCopyWithImpl<_$LocalAccountImpl>(this, _$identity);
2023-07-07 19:33:28 -04:00
@override
Map<String, dynamic> toJson() {
2023-09-28 10:06:22 -04:00
return _$$LocalAccountImplToJson(
2023-07-07 19:33:28 -04:00
this,
);
}
}
abstract class _LocalAccount implements LocalAccount {
const factory _LocalAccount(
{required final IdentityMaster identityMaster,
2023-08-01 00:39:50 -04:00
@Uint8ListJsonConverter() required final Uint8List identitySecretBytes,
2023-07-07 19:33:28 -04:00
required final EncryptionKeyType encryptionKeyType,
required final bool biometricsEnabled,
2023-07-28 20:36:05 -04:00
required final bool hiddenAccount,
2023-09-28 10:06:22 -04:00
required final String name}) = _$LocalAccountImpl;
2023-07-07 19:33:28 -04:00
factory _LocalAccount.fromJson(Map<String, dynamic> json) =
2023-09-28 10:06:22 -04:00
_$LocalAccountImpl.fromJson;
2023-07-07 19:33:28 -04:00
@override // The master key record for the account, containing the identityPublicKey
IdentityMaster get identityMaster;
2023-08-01 00:39:50 -04:00
@override // The encrypted identity secret that goes with
// the identityPublicKey with appended salt
2023-07-16 21:41:40 -04:00
@Uint8ListJsonConverter()
2023-08-01 00:39:50 -04:00
Uint8List get identitySecretBytes;
2023-07-07 19:33:28 -04:00
@override // The kind of encryption input used on the account
EncryptionKeyType get encryptionKeyType;
@override // If account is not hidden, password can be retrieved via
bool get biometricsEnabled;
@override // Keep account hidden unless account password is entered
// (tries all hidden accounts with auth method (no biometrics))
bool get hiddenAccount;
2023-07-28 20:36:05 -04:00
@override // Display name for account until it is unlocked
String get name;
2023-07-07 19:33:28 -04:00
@override
@JsonKey(ignore: true)
2023-09-28 10:06:22 -04:00
_$$LocalAccountImplCopyWith<_$LocalAccountImpl> get copyWith =>
2023-07-07 19:33:28 -04:00
throw _privateConstructorUsedError;
}