yubioath-flutter/lib/otp/models.freezed.dart

1492 lines
47 KiB
Dart
Raw Normal View History

2023-11-09 16:09:59 +03: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 'models.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');
OtpState _$OtpStateFromJson(Map<String, dynamic> json) {
return _OtpState.fromJson(json);
}
/// @nodoc
mixin _$OtpState {
bool get slot1Configured => throw _privateConstructorUsedError;
bool get slot2Configured => throw _privateConstructorUsedError;
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
@JsonKey(ignore: true)
$OtpStateCopyWith<OtpState> get copyWith =>
throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $OtpStateCopyWith<$Res> {
factory $OtpStateCopyWith(OtpState value, $Res Function(OtpState) then) =
_$OtpStateCopyWithImpl<$Res, OtpState>;
@useResult
$Res call({bool slot1Configured, bool slot2Configured});
}
/// @nodoc
class _$OtpStateCopyWithImpl<$Res, $Val extends OtpState>
implements $OtpStateCopyWith<$Res> {
_$OtpStateCopyWithImpl(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? slot1Configured = null,
Object? slot2Configured = null,
}) {
return _then(_value.copyWith(
slot1Configured: null == slot1Configured
? _value.slot1Configured
: slot1Configured // ignore: cast_nullable_to_non_nullable
as bool,
slot2Configured: null == slot2Configured
? _value.slot2Configured
: slot2Configured // ignore: cast_nullable_to_non_nullable
as bool,
) as $Val);
}
}
/// @nodoc
2023-12-13 21:35:17 +03:00
abstract class _$$OtpStateImplCopyWith<$Res>
implements $OtpStateCopyWith<$Res> {
factory _$$OtpStateImplCopyWith(
_$OtpStateImpl value, $Res Function(_$OtpStateImpl) then) =
__$$OtpStateImplCopyWithImpl<$Res>;
2023-11-09 16:09:59 +03:00
@override
@useResult
$Res call({bool slot1Configured, bool slot2Configured});
}
/// @nodoc
2023-12-13 21:35:17 +03:00
class __$$OtpStateImplCopyWithImpl<$Res>
extends _$OtpStateCopyWithImpl<$Res, _$OtpStateImpl>
implements _$$OtpStateImplCopyWith<$Res> {
__$$OtpStateImplCopyWithImpl(
_$OtpStateImpl _value, $Res Function(_$OtpStateImpl) _then)
2023-11-09 16:09:59 +03:00
: super(_value, _then);
@pragma('vm:prefer-inline')
@override
$Res call({
Object? slot1Configured = null,
Object? slot2Configured = null,
}) {
2023-12-13 21:35:17 +03:00
return _then(_$OtpStateImpl(
2023-11-09 16:09:59 +03:00
slot1Configured: null == slot1Configured
? _value.slot1Configured
: slot1Configured // ignore: cast_nullable_to_non_nullable
as bool,
slot2Configured: null == slot2Configured
? _value.slot2Configured
: slot2Configured // ignore: cast_nullable_to_non_nullable
as bool,
));
}
}
/// @nodoc
@JsonSerializable()
2023-12-13 21:35:17 +03:00
class _$OtpStateImpl extends _OtpState {
_$OtpStateImpl({required this.slot1Configured, required this.slot2Configured})
2023-11-09 16:09:59 +03:00
: super._();
2023-12-13 21:35:17 +03:00
factory _$OtpStateImpl.fromJson(Map<String, dynamic> json) =>
_$$OtpStateImplFromJson(json);
2023-11-09 16:09:59 +03:00
@override
final bool slot1Configured;
@override
final bool slot2Configured;
@override
String toString() {
return 'OtpState(slot1Configured: $slot1Configured, slot2Configured: $slot2Configured)';
}
@override
bool operator ==(dynamic other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
2023-12-13 21:35:17 +03:00
other is _$OtpStateImpl &&
2023-11-09 16:09:59 +03:00
(identical(other.slot1Configured, slot1Configured) ||
other.slot1Configured == slot1Configured) &&
(identical(other.slot2Configured, slot2Configured) ||
other.slot2Configured == slot2Configured));
}
@JsonKey(ignore: true)
@override
int get hashCode =>
Object.hash(runtimeType, slot1Configured, slot2Configured);
@JsonKey(ignore: true)
@override
@pragma('vm:prefer-inline')
2023-12-13 21:35:17 +03:00
_$$OtpStateImplCopyWith<_$OtpStateImpl> get copyWith =>
__$$OtpStateImplCopyWithImpl<_$OtpStateImpl>(this, _$identity);
2023-11-09 16:09:59 +03:00
@override
Map<String, dynamic> toJson() {
2023-12-13 21:35:17 +03:00
return _$$OtpStateImplToJson(
2023-11-09 16:09:59 +03:00
this,
);
}
}
abstract class _OtpState extends OtpState {
factory _OtpState(
{required final bool slot1Configured,
2023-12-13 21:35:17 +03:00
required final bool slot2Configured}) = _$OtpStateImpl;
2023-11-09 16:09:59 +03:00
_OtpState._() : super._();
2023-12-13 21:35:17 +03:00
factory _OtpState.fromJson(Map<String, dynamic> json) =
_$OtpStateImpl.fromJson;
2023-11-09 16:09:59 +03:00
@override
bool get slot1Configured;
@override
bool get slot2Configured;
@override
@JsonKey(ignore: true)
2023-12-13 21:35:17 +03:00
_$$OtpStateImplCopyWith<_$OtpStateImpl> get copyWith =>
2023-11-09 16:09:59 +03:00
throw _privateConstructorUsedError;
}
/// @nodoc
mixin _$OtpSlot {
SlotId get slot => throw _privateConstructorUsedError;
bool get isConfigured => throw _privateConstructorUsedError;
@JsonKey(ignore: true)
$OtpSlotCopyWith<OtpSlot> get copyWith => throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $OtpSlotCopyWith<$Res> {
factory $OtpSlotCopyWith(OtpSlot value, $Res Function(OtpSlot) then) =
_$OtpSlotCopyWithImpl<$Res, OtpSlot>;
@useResult
$Res call({SlotId slot, bool isConfigured});
}
/// @nodoc
class _$OtpSlotCopyWithImpl<$Res, $Val extends OtpSlot>
implements $OtpSlotCopyWith<$Res> {
_$OtpSlotCopyWithImpl(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? slot = null,
Object? isConfigured = null,
}) {
return _then(_value.copyWith(
slot: null == slot
? _value.slot
: slot // ignore: cast_nullable_to_non_nullable
as SlotId,
isConfigured: null == isConfigured
? _value.isConfigured
: isConfigured // ignore: cast_nullable_to_non_nullable
as bool,
) as $Val);
}
}
/// @nodoc
2023-12-13 21:35:17 +03:00
abstract class _$$OtpSlotImplCopyWith<$Res> implements $OtpSlotCopyWith<$Res> {
factory _$$OtpSlotImplCopyWith(
_$OtpSlotImpl value, $Res Function(_$OtpSlotImpl) then) =
__$$OtpSlotImplCopyWithImpl<$Res>;
2023-11-09 16:09:59 +03:00
@override
@useResult
$Res call({SlotId slot, bool isConfigured});
}
/// @nodoc
2023-12-13 21:35:17 +03:00
class __$$OtpSlotImplCopyWithImpl<$Res>
extends _$OtpSlotCopyWithImpl<$Res, _$OtpSlotImpl>
implements _$$OtpSlotImplCopyWith<$Res> {
__$$OtpSlotImplCopyWithImpl(
_$OtpSlotImpl _value, $Res Function(_$OtpSlotImpl) _then)
2023-11-09 16:09:59 +03:00
: super(_value, _then);
@pragma('vm:prefer-inline')
@override
$Res call({
Object? slot = null,
Object? isConfigured = null,
}) {
2023-12-13 21:35:17 +03:00
return _then(_$OtpSlotImpl(
2023-11-09 16:09:59 +03:00
slot: null == slot
? _value.slot
: slot // ignore: cast_nullable_to_non_nullable
as SlotId,
isConfigured: null == isConfigured
? _value.isConfigured
: isConfigured // ignore: cast_nullable_to_non_nullable
as bool,
));
}
}
/// @nodoc
2023-12-13 21:35:17 +03:00
class _$OtpSlotImpl implements _OtpSlot {
_$OtpSlotImpl({required this.slot, required this.isConfigured});
2023-11-09 16:09:59 +03:00
@override
final SlotId slot;
@override
final bool isConfigured;
@override
String toString() {
return 'OtpSlot(slot: $slot, isConfigured: $isConfigured)';
}
@override
bool operator ==(dynamic other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
2023-12-13 21:35:17 +03:00
other is _$OtpSlotImpl &&
2023-11-09 16:09:59 +03:00
(identical(other.slot, slot) || other.slot == slot) &&
(identical(other.isConfigured, isConfigured) ||
other.isConfigured == isConfigured));
}
@override
int get hashCode => Object.hash(runtimeType, slot, isConfigured);
@JsonKey(ignore: true)
@override
@pragma('vm:prefer-inline')
2023-12-13 21:35:17 +03:00
_$$OtpSlotImplCopyWith<_$OtpSlotImpl> get copyWith =>
__$$OtpSlotImplCopyWithImpl<_$OtpSlotImpl>(this, _$identity);
2023-11-09 16:09:59 +03:00
}
abstract class _OtpSlot implements OtpSlot {
factory _OtpSlot(
{required final SlotId slot,
2023-12-13 21:35:17 +03:00
required final bool isConfigured}) = _$OtpSlotImpl;
2023-11-09 16:09:59 +03:00
@override
SlotId get slot;
@override
bool get isConfigured;
@override
@JsonKey(ignore: true)
2023-12-13 21:35:17 +03:00
_$$OtpSlotImplCopyWith<_$OtpSlotImpl> get copyWith =>
2023-11-09 16:09:59 +03:00
throw _privateConstructorUsedError;
}
SlotConfigurationOptions _$SlotConfigurationOptionsFromJson(
Map<String, dynamic> json) {
return _SlotConfigurationOptions.fromJson(json);
}
/// @nodoc
mixin _$SlotConfigurationOptions {
bool? get digits8 => throw _privateConstructorUsedError;
bool? get requireTouch => throw _privateConstructorUsedError;
bool? get appendCr => throw _privateConstructorUsedError;
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
@JsonKey(ignore: true)
$SlotConfigurationOptionsCopyWith<SlotConfigurationOptions> get copyWith =>
throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $SlotConfigurationOptionsCopyWith<$Res> {
factory $SlotConfigurationOptionsCopyWith(SlotConfigurationOptions value,
$Res Function(SlotConfigurationOptions) then) =
_$SlotConfigurationOptionsCopyWithImpl<$Res, SlotConfigurationOptions>;
@useResult
$Res call({bool? digits8, bool? requireTouch, bool? appendCr});
}
/// @nodoc
class _$SlotConfigurationOptionsCopyWithImpl<$Res,
$Val extends SlotConfigurationOptions>
implements $SlotConfigurationOptionsCopyWith<$Res> {
_$SlotConfigurationOptionsCopyWithImpl(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? digits8 = freezed,
Object? requireTouch = freezed,
Object? appendCr = freezed,
}) {
return _then(_value.copyWith(
digits8: freezed == digits8
? _value.digits8
: digits8 // ignore: cast_nullable_to_non_nullable
as bool?,
requireTouch: freezed == requireTouch
? _value.requireTouch
: requireTouch // ignore: cast_nullable_to_non_nullable
as bool?,
appendCr: freezed == appendCr
? _value.appendCr
: appendCr // ignore: cast_nullable_to_non_nullable
as bool?,
) as $Val);
}
}
/// @nodoc
2023-12-13 21:35:17 +03:00
abstract class _$$SlotConfigurationOptionsImplCopyWith<$Res>
2023-11-09 16:09:59 +03:00
implements $SlotConfigurationOptionsCopyWith<$Res> {
2023-12-13 21:35:17 +03:00
factory _$$SlotConfigurationOptionsImplCopyWith(
_$SlotConfigurationOptionsImpl value,
$Res Function(_$SlotConfigurationOptionsImpl) then) =
__$$SlotConfigurationOptionsImplCopyWithImpl<$Res>;
2023-11-09 16:09:59 +03:00
@override
@useResult
$Res call({bool? digits8, bool? requireTouch, bool? appendCr});
}
/// @nodoc
2023-12-13 21:35:17 +03:00
class __$$SlotConfigurationOptionsImplCopyWithImpl<$Res>
2023-11-09 16:09:59 +03:00
extends _$SlotConfigurationOptionsCopyWithImpl<$Res,
2023-12-13 21:35:17 +03:00
_$SlotConfigurationOptionsImpl>
implements _$$SlotConfigurationOptionsImplCopyWith<$Res> {
__$$SlotConfigurationOptionsImplCopyWithImpl(
_$SlotConfigurationOptionsImpl _value,
$Res Function(_$SlotConfigurationOptionsImpl) _then)
2023-11-09 16:09:59 +03:00
: super(_value, _then);
@pragma('vm:prefer-inline')
@override
$Res call({
Object? digits8 = freezed,
Object? requireTouch = freezed,
Object? appendCr = freezed,
}) {
2023-12-13 21:35:17 +03:00
return _then(_$SlotConfigurationOptionsImpl(
2023-11-09 16:09:59 +03:00
digits8: freezed == digits8
? _value.digits8
: digits8 // ignore: cast_nullable_to_non_nullable
as bool?,
requireTouch: freezed == requireTouch
? _value.requireTouch
: requireTouch // ignore: cast_nullable_to_non_nullable
as bool?,
appendCr: freezed == appendCr
? _value.appendCr
: appendCr // ignore: cast_nullable_to_non_nullable
as bool?,
));
}
}
/// @nodoc
@JsonSerializable(includeIfNull: false)
2023-12-13 21:35:17 +03:00
class _$SlotConfigurationOptionsImpl implements _SlotConfigurationOptions {
_$SlotConfigurationOptionsImpl(
{this.digits8, this.requireTouch, this.appendCr});
2023-11-09 16:09:59 +03:00
2023-12-13 21:35:17 +03:00
factory _$SlotConfigurationOptionsImpl.fromJson(Map<String, dynamic> json) =>
_$$SlotConfigurationOptionsImplFromJson(json);
2023-11-09 16:09:59 +03:00
@override
final bool? digits8;
@override
final bool? requireTouch;
@override
final bool? appendCr;
@override
String toString() {
return 'SlotConfigurationOptions(digits8: $digits8, requireTouch: $requireTouch, appendCr: $appendCr)';
}
@override
bool operator ==(dynamic other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
2023-12-13 21:35:17 +03:00
other is _$SlotConfigurationOptionsImpl &&
2023-11-09 16:09:59 +03:00
(identical(other.digits8, digits8) || other.digits8 == digits8) &&
(identical(other.requireTouch, requireTouch) ||
other.requireTouch == requireTouch) &&
(identical(other.appendCr, appendCr) ||
other.appendCr == appendCr));
}
@JsonKey(ignore: true)
@override
int get hashCode => Object.hash(runtimeType, digits8, requireTouch, appendCr);
@JsonKey(ignore: true)
@override
@pragma('vm:prefer-inline')
2023-12-13 21:35:17 +03:00
_$$SlotConfigurationOptionsImplCopyWith<_$SlotConfigurationOptionsImpl>
get copyWith => __$$SlotConfigurationOptionsImplCopyWithImpl<
_$SlotConfigurationOptionsImpl>(this, _$identity);
2023-11-09 16:09:59 +03:00
@override
Map<String, dynamic> toJson() {
2023-12-13 21:35:17 +03:00
return _$$SlotConfigurationOptionsImplToJson(
2023-11-09 16:09:59 +03:00
this,
);
}
}
abstract class _SlotConfigurationOptions implements SlotConfigurationOptions {
factory _SlotConfigurationOptions(
{final bool? digits8,
final bool? requireTouch,
2023-12-13 21:35:17 +03:00
final bool? appendCr}) = _$SlotConfigurationOptionsImpl;
2023-11-09 16:09:59 +03:00
factory _SlotConfigurationOptions.fromJson(Map<String, dynamic> json) =
2023-12-13 21:35:17 +03:00
_$SlotConfigurationOptionsImpl.fromJson;
2023-11-09 16:09:59 +03:00
@override
bool? get digits8;
@override
bool? get requireTouch;
@override
bool? get appendCr;
@override
@JsonKey(ignore: true)
2023-12-13 21:35:17 +03:00
_$$SlotConfigurationOptionsImplCopyWith<_$SlotConfigurationOptionsImpl>
2023-11-09 16:09:59 +03:00
get copyWith => throw _privateConstructorUsedError;
}
SlotConfiguration _$SlotConfigurationFromJson(Map<String, dynamic> json) {
switch (json['type']) {
case 'hotp':
return _SlotConfigurationHotp.fromJson(json);
case 'hmac_sha1':
return _SlotConfigurationHmacSha1.fromJson(json);
case 'static_password':
return _SlotConfigurationStaticPassword.fromJson(json);
case 'yubiotp':
return _SlotConfigurationYubiOtp.fromJson(json);
default:
throw CheckedFromJsonException(json, 'type', 'SlotConfiguration',
'Invalid union type "${json['type']}"!');
}
}
/// @nodoc
mixin _$SlotConfiguration {
SlotConfigurationOptions? get options => throw _privateConstructorUsedError;
@optionalTypeArgs
TResult when<TResult extends Object?>({
required TResult Function(String key, SlotConfigurationOptions? options)
hotp,
required TResult Function(String key, SlotConfigurationOptions? options)
chalresp,
required TResult Function(String password, String keyboardLayout,
SlotConfigurationOptions? options)
static,
required TResult Function(String publicId, String privateId, String key,
SlotConfigurationOptions? options)
yubiotp,
}) =>
throw _privateConstructorUsedError;
@optionalTypeArgs
TResult? whenOrNull<TResult extends Object?>({
TResult? Function(String key, SlotConfigurationOptions? options)? hotp,
TResult? Function(String key, SlotConfigurationOptions? options)? chalresp,
TResult? Function(String password, String keyboardLayout,
SlotConfigurationOptions? options)?
static,
TResult? Function(String publicId, String privateId, String key,
SlotConfigurationOptions? options)?
yubiotp,
}) =>
throw _privateConstructorUsedError;
@optionalTypeArgs
TResult maybeWhen<TResult extends Object?>({
TResult Function(String key, SlotConfigurationOptions? options)? hotp,
TResult Function(String key, SlotConfigurationOptions? options)? chalresp,
TResult Function(String password, String keyboardLayout,
SlotConfigurationOptions? options)?
static,
TResult Function(String publicId, String privateId, String key,
SlotConfigurationOptions? options)?
yubiotp,
required TResult orElse(),
}) =>
throw _privateConstructorUsedError;
@optionalTypeArgs
TResult map<TResult extends Object?>({
required TResult Function(_SlotConfigurationHotp value) hotp,
required TResult Function(_SlotConfigurationHmacSha1 value) chalresp,
required TResult Function(_SlotConfigurationStaticPassword value) static,
required TResult Function(_SlotConfigurationYubiOtp value) yubiotp,
}) =>
throw _privateConstructorUsedError;
@optionalTypeArgs
TResult? mapOrNull<TResult extends Object?>({
TResult? Function(_SlotConfigurationHotp value)? hotp,
TResult? Function(_SlotConfigurationHmacSha1 value)? chalresp,
TResult? Function(_SlotConfigurationStaticPassword value)? static,
TResult? Function(_SlotConfigurationYubiOtp value)? yubiotp,
}) =>
throw _privateConstructorUsedError;
@optionalTypeArgs
TResult maybeMap<TResult extends Object?>({
TResult Function(_SlotConfigurationHotp value)? hotp,
TResult Function(_SlotConfigurationHmacSha1 value)? chalresp,
TResult Function(_SlotConfigurationStaticPassword value)? static,
TResult Function(_SlotConfigurationYubiOtp value)? yubiotp,
required TResult orElse(),
}) =>
throw _privateConstructorUsedError;
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
@JsonKey(ignore: true)
$SlotConfigurationCopyWith<SlotConfiguration> get copyWith =>
throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $SlotConfigurationCopyWith<$Res> {
factory $SlotConfigurationCopyWith(
SlotConfiguration value, $Res Function(SlotConfiguration) then) =
_$SlotConfigurationCopyWithImpl<$Res, SlotConfiguration>;
@useResult
$Res call({SlotConfigurationOptions? options});
$SlotConfigurationOptionsCopyWith<$Res>? get options;
}
/// @nodoc
class _$SlotConfigurationCopyWithImpl<$Res, $Val extends SlotConfiguration>
implements $SlotConfigurationCopyWith<$Res> {
_$SlotConfigurationCopyWithImpl(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? options = freezed,
}) {
return _then(_value.copyWith(
options: freezed == options
? _value.options
: options // ignore: cast_nullable_to_non_nullable
as SlotConfigurationOptions?,
) as $Val);
}
@override
@pragma('vm:prefer-inline')
$SlotConfigurationOptionsCopyWith<$Res>? get options {
if (_value.options == null) {
return null;
}
return $SlotConfigurationOptionsCopyWith<$Res>(_value.options!, (value) {
return _then(_value.copyWith(options: value) as $Val);
});
}
}
/// @nodoc
2023-12-13 21:35:17 +03:00
abstract class _$$SlotConfigurationHotpImplCopyWith<$Res>
2023-11-09 16:09:59 +03:00
implements $SlotConfigurationCopyWith<$Res> {
2023-12-13 21:35:17 +03:00
factory _$$SlotConfigurationHotpImplCopyWith(
_$SlotConfigurationHotpImpl value,
$Res Function(_$SlotConfigurationHotpImpl) then) =
__$$SlotConfigurationHotpImplCopyWithImpl<$Res>;
2023-11-09 16:09:59 +03:00
@override
@useResult
$Res call({String key, SlotConfigurationOptions? options});
@override
$SlotConfigurationOptionsCopyWith<$Res>? get options;
}
/// @nodoc
2023-12-13 21:35:17 +03:00
class __$$SlotConfigurationHotpImplCopyWithImpl<$Res>
extends _$SlotConfigurationCopyWithImpl<$Res, _$SlotConfigurationHotpImpl>
implements _$$SlotConfigurationHotpImplCopyWith<$Res> {
__$$SlotConfigurationHotpImplCopyWithImpl(_$SlotConfigurationHotpImpl _value,
$Res Function(_$SlotConfigurationHotpImpl) _then)
2023-11-09 16:09:59 +03:00
: super(_value, _then);
@pragma('vm:prefer-inline')
@override
$Res call({
Object? key = null,
Object? options = freezed,
}) {
2023-12-13 21:35:17 +03:00
return _then(_$SlotConfigurationHotpImpl(
2023-11-09 16:09:59 +03:00
key: null == key
? _value.key
: key // ignore: cast_nullable_to_non_nullable
as String,
options: freezed == options
? _value.options
: options // ignore: cast_nullable_to_non_nullable
as SlotConfigurationOptions?,
));
}
}
/// @nodoc
@JsonSerializable(explicitToJson: true, includeIfNull: false)
2023-12-13 21:35:17 +03:00
class _$SlotConfigurationHotpImpl extends _SlotConfigurationHotp {
const _$SlotConfigurationHotpImpl(
2023-11-09 16:09:59 +03:00
{required this.key, this.options, final String? $type})
: $type = $type ?? 'hotp',
super._();
2023-12-13 21:35:17 +03:00
factory _$SlotConfigurationHotpImpl.fromJson(Map<String, dynamic> json) =>
_$$SlotConfigurationHotpImplFromJson(json);
2023-11-09 16:09:59 +03:00
@override
final String key;
@override
final SlotConfigurationOptions? options;
@JsonKey(name: 'type')
final String $type;
@override
String toString() {
return 'SlotConfiguration.hotp(key: $key, options: $options)';
}
@override
bool operator ==(dynamic other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
2023-12-13 21:35:17 +03:00
other is _$SlotConfigurationHotpImpl &&
2023-11-09 16:09:59 +03:00
(identical(other.key, key) || other.key == key) &&
(identical(other.options, options) || other.options == options));
}
@JsonKey(ignore: true)
@override
int get hashCode => Object.hash(runtimeType, key, options);
@JsonKey(ignore: true)
@override
@pragma('vm:prefer-inline')
2023-12-13 21:35:17 +03:00
_$$SlotConfigurationHotpImplCopyWith<_$SlotConfigurationHotpImpl>
get copyWith => __$$SlotConfigurationHotpImplCopyWithImpl<
_$SlotConfigurationHotpImpl>(this, _$identity);
2023-11-09 16:09:59 +03:00
@override
@optionalTypeArgs
TResult when<TResult extends Object?>({
required TResult Function(String key, SlotConfigurationOptions? options)
hotp,
required TResult Function(String key, SlotConfigurationOptions? options)
chalresp,
required TResult Function(String password, String keyboardLayout,
SlotConfigurationOptions? options)
static,
required TResult Function(String publicId, String privateId, String key,
SlotConfigurationOptions? options)
yubiotp,
}) {
return hotp(key, options);
}
@override
@optionalTypeArgs
TResult? whenOrNull<TResult extends Object?>({
TResult? Function(String key, SlotConfigurationOptions? options)? hotp,
TResult? Function(String key, SlotConfigurationOptions? options)? chalresp,
TResult? Function(String password, String keyboardLayout,
SlotConfigurationOptions? options)?
static,
TResult? Function(String publicId, String privateId, String key,
SlotConfigurationOptions? options)?
yubiotp,
}) {
return hotp?.call(key, options);
}
@override
@optionalTypeArgs
TResult maybeWhen<TResult extends Object?>({
TResult Function(String key, SlotConfigurationOptions? options)? hotp,
TResult Function(String key, SlotConfigurationOptions? options)? chalresp,
TResult Function(String password, String keyboardLayout,
SlotConfigurationOptions? options)?
static,
TResult Function(String publicId, String privateId, String key,
SlotConfigurationOptions? options)?
yubiotp,
required TResult orElse(),
}) {
if (hotp != null) {
return hotp(key, options);
}
return orElse();
}
@override
@optionalTypeArgs
TResult map<TResult extends Object?>({
required TResult Function(_SlotConfigurationHotp value) hotp,
required TResult Function(_SlotConfigurationHmacSha1 value) chalresp,
required TResult Function(_SlotConfigurationStaticPassword value) static,
required TResult Function(_SlotConfigurationYubiOtp value) yubiotp,
}) {
return hotp(this);
}
@override
@optionalTypeArgs
TResult? mapOrNull<TResult extends Object?>({
TResult? Function(_SlotConfigurationHotp value)? hotp,
TResult? Function(_SlotConfigurationHmacSha1 value)? chalresp,
TResult? Function(_SlotConfigurationStaticPassword value)? static,
TResult? Function(_SlotConfigurationYubiOtp value)? yubiotp,
}) {
return hotp?.call(this);
}
@override
@optionalTypeArgs
TResult maybeMap<TResult extends Object?>({
TResult Function(_SlotConfigurationHotp value)? hotp,
TResult Function(_SlotConfigurationHmacSha1 value)? chalresp,
TResult Function(_SlotConfigurationStaticPassword value)? static,
TResult Function(_SlotConfigurationYubiOtp value)? yubiotp,
required TResult orElse(),
}) {
if (hotp != null) {
return hotp(this);
}
return orElse();
}
@override
Map<String, dynamic> toJson() {
2023-12-13 21:35:17 +03:00
return _$$SlotConfigurationHotpImplToJson(
2023-11-09 16:09:59 +03:00
this,
);
}
}
abstract class _SlotConfigurationHotp extends SlotConfiguration {
const factory _SlotConfigurationHotp(
{required final String key,
2023-12-13 21:35:17 +03:00
final SlotConfigurationOptions? options}) = _$SlotConfigurationHotpImpl;
2023-11-09 16:09:59 +03:00
const _SlotConfigurationHotp._() : super._();
factory _SlotConfigurationHotp.fromJson(Map<String, dynamic> json) =
2023-12-13 21:35:17 +03:00
_$SlotConfigurationHotpImpl.fromJson;
2023-11-09 16:09:59 +03:00
String get key;
@override
SlotConfigurationOptions? get options;
@override
@JsonKey(ignore: true)
2023-12-13 21:35:17 +03:00
_$$SlotConfigurationHotpImplCopyWith<_$SlotConfigurationHotpImpl>
get copyWith => throw _privateConstructorUsedError;
2023-11-09 16:09:59 +03:00
}
/// @nodoc
2023-12-13 21:35:17 +03:00
abstract class _$$SlotConfigurationHmacSha1ImplCopyWith<$Res>
2023-11-09 16:09:59 +03:00
implements $SlotConfigurationCopyWith<$Res> {
2023-12-13 21:35:17 +03:00
factory _$$SlotConfigurationHmacSha1ImplCopyWith(
_$SlotConfigurationHmacSha1Impl value,
$Res Function(_$SlotConfigurationHmacSha1Impl) then) =
__$$SlotConfigurationHmacSha1ImplCopyWithImpl<$Res>;
2023-11-09 16:09:59 +03:00
@override
@useResult
$Res call({String key, SlotConfigurationOptions? options});
@override
$SlotConfigurationOptionsCopyWith<$Res>? get options;
}
/// @nodoc
2023-12-13 21:35:17 +03:00
class __$$SlotConfigurationHmacSha1ImplCopyWithImpl<$Res>
extends _$SlotConfigurationCopyWithImpl<$Res,
_$SlotConfigurationHmacSha1Impl>
implements _$$SlotConfigurationHmacSha1ImplCopyWith<$Res> {
__$$SlotConfigurationHmacSha1ImplCopyWithImpl(
_$SlotConfigurationHmacSha1Impl _value,
$Res Function(_$SlotConfigurationHmacSha1Impl) _then)
2023-11-09 16:09:59 +03:00
: super(_value, _then);
@pragma('vm:prefer-inline')
@override
$Res call({
Object? key = null,
Object? options = freezed,
}) {
2023-12-13 21:35:17 +03:00
return _then(_$SlotConfigurationHmacSha1Impl(
2023-11-09 16:09:59 +03:00
key: null == key
? _value.key
: key // ignore: cast_nullable_to_non_nullable
as String,
options: freezed == options
? _value.options
: options // ignore: cast_nullable_to_non_nullable
as SlotConfigurationOptions?,
));
}
}
/// @nodoc
@JsonSerializable(explicitToJson: true, includeIfNull: false)
2023-12-13 21:35:17 +03:00
class _$SlotConfigurationHmacSha1Impl extends _SlotConfigurationHmacSha1 {
const _$SlotConfigurationHmacSha1Impl(
2023-11-09 16:09:59 +03:00
{required this.key, this.options, final String? $type})
: $type = $type ?? 'hmac_sha1',
super._();
2023-12-13 21:35:17 +03:00
factory _$SlotConfigurationHmacSha1Impl.fromJson(Map<String, dynamic> json) =>
_$$SlotConfigurationHmacSha1ImplFromJson(json);
2023-11-09 16:09:59 +03:00
@override
final String key;
@override
final SlotConfigurationOptions? options;
@JsonKey(name: 'type')
final String $type;
@override
String toString() {
return 'SlotConfiguration.chalresp(key: $key, options: $options)';
}
@override
bool operator ==(dynamic other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
2023-12-13 21:35:17 +03:00
other is _$SlotConfigurationHmacSha1Impl &&
2023-11-09 16:09:59 +03:00
(identical(other.key, key) || other.key == key) &&
(identical(other.options, options) || other.options == options));
}
@JsonKey(ignore: true)
@override
int get hashCode => Object.hash(runtimeType, key, options);
@JsonKey(ignore: true)
@override
@pragma('vm:prefer-inline')
2023-12-13 21:35:17 +03:00
_$$SlotConfigurationHmacSha1ImplCopyWith<_$SlotConfigurationHmacSha1Impl>
get copyWith => __$$SlotConfigurationHmacSha1ImplCopyWithImpl<
_$SlotConfigurationHmacSha1Impl>(this, _$identity);
2023-11-09 16:09:59 +03:00
@override
@optionalTypeArgs
TResult when<TResult extends Object?>({
required TResult Function(String key, SlotConfigurationOptions? options)
hotp,
required TResult Function(String key, SlotConfigurationOptions? options)
chalresp,
required TResult Function(String password, String keyboardLayout,
SlotConfigurationOptions? options)
static,
required TResult Function(String publicId, String privateId, String key,
SlotConfigurationOptions? options)
yubiotp,
}) {
return chalresp(key, options);
}
@override
@optionalTypeArgs
TResult? whenOrNull<TResult extends Object?>({
TResult? Function(String key, SlotConfigurationOptions? options)? hotp,
TResult? Function(String key, SlotConfigurationOptions? options)? chalresp,
TResult? Function(String password, String keyboardLayout,
SlotConfigurationOptions? options)?
static,
TResult? Function(String publicId, String privateId, String key,
SlotConfigurationOptions? options)?
yubiotp,
}) {
return chalresp?.call(key, options);
}
@override
@optionalTypeArgs
TResult maybeWhen<TResult extends Object?>({
TResult Function(String key, SlotConfigurationOptions? options)? hotp,
TResult Function(String key, SlotConfigurationOptions? options)? chalresp,
TResult Function(String password, String keyboardLayout,
SlotConfigurationOptions? options)?
static,
TResult Function(String publicId, String privateId, String key,
SlotConfigurationOptions? options)?
yubiotp,
required TResult orElse(),
}) {
if (chalresp != null) {
return chalresp(key, options);
}
return orElse();
}
@override
@optionalTypeArgs
TResult map<TResult extends Object?>({
required TResult Function(_SlotConfigurationHotp value) hotp,
required TResult Function(_SlotConfigurationHmacSha1 value) chalresp,
required TResult Function(_SlotConfigurationStaticPassword value) static,
required TResult Function(_SlotConfigurationYubiOtp value) yubiotp,
}) {
return chalresp(this);
}
@override
@optionalTypeArgs
TResult? mapOrNull<TResult extends Object?>({
TResult? Function(_SlotConfigurationHotp value)? hotp,
TResult? Function(_SlotConfigurationHmacSha1 value)? chalresp,
TResult? Function(_SlotConfigurationStaticPassword value)? static,
TResult? Function(_SlotConfigurationYubiOtp value)? yubiotp,
}) {
return chalresp?.call(this);
}
@override
@optionalTypeArgs
TResult maybeMap<TResult extends Object?>({
TResult Function(_SlotConfigurationHotp value)? hotp,
TResult Function(_SlotConfigurationHmacSha1 value)? chalresp,
TResult Function(_SlotConfigurationStaticPassword value)? static,
TResult Function(_SlotConfigurationYubiOtp value)? yubiotp,
required TResult orElse(),
}) {
if (chalresp != null) {
return chalresp(this);
}
return orElse();
}
@override
Map<String, dynamic> toJson() {
2023-12-13 21:35:17 +03:00
return _$$SlotConfigurationHmacSha1ImplToJson(
2023-11-09 16:09:59 +03:00
this,
);
}
}
abstract class _SlotConfigurationHmacSha1 extends SlotConfiguration {
const factory _SlotConfigurationHmacSha1(
2023-12-13 21:35:17 +03:00
{required final String key,
final SlotConfigurationOptions? options}) =
_$SlotConfigurationHmacSha1Impl;
2023-11-09 16:09:59 +03:00
const _SlotConfigurationHmacSha1._() : super._();
factory _SlotConfigurationHmacSha1.fromJson(Map<String, dynamic> json) =
2023-12-13 21:35:17 +03:00
_$SlotConfigurationHmacSha1Impl.fromJson;
2023-11-09 16:09:59 +03:00
String get key;
@override
SlotConfigurationOptions? get options;
@override
@JsonKey(ignore: true)
2023-12-13 21:35:17 +03:00
_$$SlotConfigurationHmacSha1ImplCopyWith<_$SlotConfigurationHmacSha1Impl>
2023-11-09 16:09:59 +03:00
get copyWith => throw _privateConstructorUsedError;
}
/// @nodoc
2023-12-13 21:35:17 +03:00
abstract class _$$SlotConfigurationStaticPasswordImplCopyWith<$Res>
2023-11-09 16:09:59 +03:00
implements $SlotConfigurationCopyWith<$Res> {
2023-12-13 21:35:17 +03:00
factory _$$SlotConfigurationStaticPasswordImplCopyWith(
_$SlotConfigurationStaticPasswordImpl value,
$Res Function(_$SlotConfigurationStaticPasswordImpl) then) =
__$$SlotConfigurationStaticPasswordImplCopyWithImpl<$Res>;
2023-11-09 16:09:59 +03:00
@override
@useResult
$Res call(
{String password,
String keyboardLayout,
SlotConfigurationOptions? options});
@override
$SlotConfigurationOptionsCopyWith<$Res>? get options;
}
/// @nodoc
2023-12-13 21:35:17 +03:00
class __$$SlotConfigurationStaticPasswordImplCopyWithImpl<$Res>
2023-11-09 16:09:59 +03:00
extends _$SlotConfigurationCopyWithImpl<$Res,
2023-12-13 21:35:17 +03:00
_$SlotConfigurationStaticPasswordImpl>
implements _$$SlotConfigurationStaticPasswordImplCopyWith<$Res> {
__$$SlotConfigurationStaticPasswordImplCopyWithImpl(
_$SlotConfigurationStaticPasswordImpl _value,
$Res Function(_$SlotConfigurationStaticPasswordImpl) _then)
2023-11-09 16:09:59 +03:00
: super(_value, _then);
@pragma('vm:prefer-inline')
@override
$Res call({
Object? password = null,
Object? keyboardLayout = null,
Object? options = freezed,
}) {
2023-12-13 21:35:17 +03:00
return _then(_$SlotConfigurationStaticPasswordImpl(
2023-11-09 16:09:59 +03:00
password: null == password
? _value.password
: password // ignore: cast_nullable_to_non_nullable
as String,
keyboardLayout: null == keyboardLayout
? _value.keyboardLayout
: keyboardLayout // ignore: cast_nullable_to_non_nullable
as String,
options: freezed == options
? _value.options
: options // ignore: cast_nullable_to_non_nullable
as SlotConfigurationOptions?,
));
}
}
/// @nodoc
@JsonSerializable(explicitToJson: true, includeIfNull: false)
2023-12-13 21:35:17 +03:00
class _$SlotConfigurationStaticPasswordImpl
2023-11-09 16:09:59 +03:00
extends _SlotConfigurationStaticPassword {
2023-12-13 21:35:17 +03:00
const _$SlotConfigurationStaticPasswordImpl(
2023-11-09 16:09:59 +03:00
{required this.password,
required this.keyboardLayout,
this.options,
final String? $type})
: $type = $type ?? 'static_password',
super._();
2023-12-13 21:35:17 +03:00
factory _$SlotConfigurationStaticPasswordImpl.fromJson(
2023-11-09 16:09:59 +03:00
Map<String, dynamic> json) =>
2023-12-13 21:35:17 +03:00
_$$SlotConfigurationStaticPasswordImplFromJson(json);
2023-11-09 16:09:59 +03:00
@override
final String password;
@override
final String keyboardLayout;
@override
final SlotConfigurationOptions? options;
@JsonKey(name: 'type')
final String $type;
@override
String toString() {
return 'SlotConfiguration.static(password: $password, keyboardLayout: $keyboardLayout, options: $options)';
}
@override
bool operator ==(dynamic other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
2023-12-13 21:35:17 +03:00
other is _$SlotConfigurationStaticPasswordImpl &&
2023-11-09 16:09:59 +03:00
(identical(other.password, password) ||
other.password == password) &&
(identical(other.keyboardLayout, keyboardLayout) ||
other.keyboardLayout == keyboardLayout) &&
(identical(other.options, options) || other.options == options));
}
@JsonKey(ignore: true)
@override
int get hashCode =>
Object.hash(runtimeType, password, keyboardLayout, options);
@JsonKey(ignore: true)
@override
@pragma('vm:prefer-inline')
2023-12-13 21:35:17 +03:00
_$$SlotConfigurationStaticPasswordImplCopyWith<
_$SlotConfigurationStaticPasswordImpl>
get copyWith => __$$SlotConfigurationStaticPasswordImplCopyWithImpl<
_$SlotConfigurationStaticPasswordImpl>(this, _$identity);
2023-11-09 16:09:59 +03:00
@override
@optionalTypeArgs
TResult when<TResult extends Object?>({
required TResult Function(String key, SlotConfigurationOptions? options)
hotp,
required TResult Function(String key, SlotConfigurationOptions? options)
chalresp,
required TResult Function(String password, String keyboardLayout,
SlotConfigurationOptions? options)
static,
required TResult Function(String publicId, String privateId, String key,
SlotConfigurationOptions? options)
yubiotp,
}) {
return static(password, keyboardLayout, options);
}
@override
@optionalTypeArgs
TResult? whenOrNull<TResult extends Object?>({
TResult? Function(String key, SlotConfigurationOptions? options)? hotp,
TResult? Function(String key, SlotConfigurationOptions? options)? chalresp,
TResult? Function(String password, String keyboardLayout,
SlotConfigurationOptions? options)?
static,
TResult? Function(String publicId, String privateId, String key,
SlotConfigurationOptions? options)?
yubiotp,
}) {
return static?.call(password, keyboardLayout, options);
}
@override
@optionalTypeArgs
TResult maybeWhen<TResult extends Object?>({
TResult Function(String key, SlotConfigurationOptions? options)? hotp,
TResult Function(String key, SlotConfigurationOptions? options)? chalresp,
TResult Function(String password, String keyboardLayout,
SlotConfigurationOptions? options)?
static,
TResult Function(String publicId, String privateId, String key,
SlotConfigurationOptions? options)?
yubiotp,
required TResult orElse(),
}) {
if (static != null) {
return static(password, keyboardLayout, options);
}
return orElse();
}
@override
@optionalTypeArgs
TResult map<TResult extends Object?>({
required TResult Function(_SlotConfigurationHotp value) hotp,
required TResult Function(_SlotConfigurationHmacSha1 value) chalresp,
required TResult Function(_SlotConfigurationStaticPassword value) static,
required TResult Function(_SlotConfigurationYubiOtp value) yubiotp,
}) {
return static(this);
}
@override
@optionalTypeArgs
TResult? mapOrNull<TResult extends Object?>({
TResult? Function(_SlotConfigurationHotp value)? hotp,
TResult? Function(_SlotConfigurationHmacSha1 value)? chalresp,
TResult? Function(_SlotConfigurationStaticPassword value)? static,
TResult? Function(_SlotConfigurationYubiOtp value)? yubiotp,
}) {
return static?.call(this);
}
@override
@optionalTypeArgs
TResult maybeMap<TResult extends Object?>({
TResult Function(_SlotConfigurationHotp value)? hotp,
TResult Function(_SlotConfigurationHmacSha1 value)? chalresp,
TResult Function(_SlotConfigurationStaticPassword value)? static,
TResult Function(_SlotConfigurationYubiOtp value)? yubiotp,
required TResult orElse(),
}) {
if (static != null) {
return static(this);
}
return orElse();
}
@override
Map<String, dynamic> toJson() {
2023-12-13 21:35:17 +03:00
return _$$SlotConfigurationStaticPasswordImplToJson(
2023-11-09 16:09:59 +03:00
this,
);
}
}
abstract class _SlotConfigurationStaticPassword extends SlotConfiguration {
const factory _SlotConfigurationStaticPassword(
{required final String password,
required final String keyboardLayout,
final SlotConfigurationOptions? options}) =
2023-12-13 21:35:17 +03:00
_$SlotConfigurationStaticPasswordImpl;
2023-11-09 16:09:59 +03:00
const _SlotConfigurationStaticPassword._() : super._();
factory _SlotConfigurationStaticPassword.fromJson(Map<String, dynamic> json) =
2023-12-13 21:35:17 +03:00
_$SlotConfigurationStaticPasswordImpl.fromJson;
2023-11-09 16:09:59 +03:00
String get password;
String get keyboardLayout;
@override
SlotConfigurationOptions? get options;
@override
@JsonKey(ignore: true)
2023-12-13 21:35:17 +03:00
_$$SlotConfigurationStaticPasswordImplCopyWith<
_$SlotConfigurationStaticPasswordImpl>
2023-11-09 16:09:59 +03:00
get copyWith => throw _privateConstructorUsedError;
}
/// @nodoc
2023-12-13 21:35:17 +03:00
abstract class _$$SlotConfigurationYubiOtpImplCopyWith<$Res>
2023-11-09 16:09:59 +03:00
implements $SlotConfigurationCopyWith<$Res> {
2023-12-13 21:35:17 +03:00
factory _$$SlotConfigurationYubiOtpImplCopyWith(
_$SlotConfigurationYubiOtpImpl value,
$Res Function(_$SlotConfigurationYubiOtpImpl) then) =
__$$SlotConfigurationYubiOtpImplCopyWithImpl<$Res>;
2023-11-09 16:09:59 +03:00
@override
@useResult
$Res call(
{String publicId,
String privateId,
String key,
SlotConfigurationOptions? options});
@override
$SlotConfigurationOptionsCopyWith<$Res>? get options;
}
/// @nodoc
2023-12-13 21:35:17 +03:00
class __$$SlotConfigurationYubiOtpImplCopyWithImpl<$Res>
extends _$SlotConfigurationCopyWithImpl<$Res,
_$SlotConfigurationYubiOtpImpl>
implements _$$SlotConfigurationYubiOtpImplCopyWith<$Res> {
__$$SlotConfigurationYubiOtpImplCopyWithImpl(
_$SlotConfigurationYubiOtpImpl _value,
$Res Function(_$SlotConfigurationYubiOtpImpl) _then)
2023-11-09 16:09:59 +03:00
: super(_value, _then);
@pragma('vm:prefer-inline')
@override
$Res call({
Object? publicId = null,
Object? privateId = null,
Object? key = null,
Object? options = freezed,
}) {
2023-12-13 21:35:17 +03:00
return _then(_$SlotConfigurationYubiOtpImpl(
2023-11-09 16:09:59 +03:00
publicId: null == publicId
? _value.publicId
: publicId // ignore: cast_nullable_to_non_nullable
as String,
privateId: null == privateId
? _value.privateId
: privateId // ignore: cast_nullable_to_non_nullable
as String,
key: null == key
? _value.key
: key // ignore: cast_nullable_to_non_nullable
as String,
options: freezed == options
? _value.options
: options // ignore: cast_nullable_to_non_nullable
as SlotConfigurationOptions?,
));
}
}
/// @nodoc
@JsonSerializable(explicitToJson: true, includeIfNull: false)
2023-12-13 21:35:17 +03:00
class _$SlotConfigurationYubiOtpImpl extends _SlotConfigurationYubiOtp {
const _$SlotConfigurationYubiOtpImpl(
2023-11-09 16:09:59 +03:00
{required this.publicId,
required this.privateId,
required this.key,
this.options,
final String? $type})
: $type = $type ?? 'yubiotp',
super._();
2023-12-13 21:35:17 +03:00
factory _$SlotConfigurationYubiOtpImpl.fromJson(Map<String, dynamic> json) =>
_$$SlotConfigurationYubiOtpImplFromJson(json);
2023-11-09 16:09:59 +03:00
@override
final String publicId;
@override
final String privateId;
@override
final String key;
@override
final SlotConfigurationOptions? options;
@JsonKey(name: 'type')
final String $type;
@override
String toString() {
return 'SlotConfiguration.yubiotp(publicId: $publicId, privateId: $privateId, key: $key, options: $options)';
}
@override
bool operator ==(dynamic other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
2023-12-13 21:35:17 +03:00
other is _$SlotConfigurationYubiOtpImpl &&
2023-11-09 16:09:59 +03:00
(identical(other.publicId, publicId) ||
other.publicId == publicId) &&
(identical(other.privateId, privateId) ||
other.privateId == privateId) &&
(identical(other.key, key) || other.key == key) &&
(identical(other.options, options) || other.options == options));
}
@JsonKey(ignore: true)
@override
int get hashCode =>
Object.hash(runtimeType, publicId, privateId, key, options);
@JsonKey(ignore: true)
@override
@pragma('vm:prefer-inline')
2023-12-13 21:35:17 +03:00
_$$SlotConfigurationYubiOtpImplCopyWith<_$SlotConfigurationYubiOtpImpl>
get copyWith => __$$SlotConfigurationYubiOtpImplCopyWithImpl<
_$SlotConfigurationYubiOtpImpl>(this, _$identity);
2023-11-09 16:09:59 +03:00
@override
@optionalTypeArgs
TResult when<TResult extends Object?>({
required TResult Function(String key, SlotConfigurationOptions? options)
hotp,
required TResult Function(String key, SlotConfigurationOptions? options)
chalresp,
required TResult Function(String password, String keyboardLayout,
SlotConfigurationOptions? options)
static,
required TResult Function(String publicId, String privateId, String key,
SlotConfigurationOptions? options)
yubiotp,
}) {
return yubiotp(publicId, privateId, key, options);
}
@override
@optionalTypeArgs
TResult? whenOrNull<TResult extends Object?>({
TResult? Function(String key, SlotConfigurationOptions? options)? hotp,
TResult? Function(String key, SlotConfigurationOptions? options)? chalresp,
TResult? Function(String password, String keyboardLayout,
SlotConfigurationOptions? options)?
static,
TResult? Function(String publicId, String privateId, String key,
SlotConfigurationOptions? options)?
yubiotp,
}) {
return yubiotp?.call(publicId, privateId, key, options);
}
@override
@optionalTypeArgs
TResult maybeWhen<TResult extends Object?>({
TResult Function(String key, SlotConfigurationOptions? options)? hotp,
TResult Function(String key, SlotConfigurationOptions? options)? chalresp,
TResult Function(String password, String keyboardLayout,
SlotConfigurationOptions? options)?
static,
TResult Function(String publicId, String privateId, String key,
SlotConfigurationOptions? options)?
yubiotp,
required TResult orElse(),
}) {
if (yubiotp != null) {
return yubiotp(publicId, privateId, key, options);
}
return orElse();
}
@override
@optionalTypeArgs
TResult map<TResult extends Object?>({
required TResult Function(_SlotConfigurationHotp value) hotp,
required TResult Function(_SlotConfigurationHmacSha1 value) chalresp,
required TResult Function(_SlotConfigurationStaticPassword value) static,
required TResult Function(_SlotConfigurationYubiOtp value) yubiotp,
}) {
return yubiotp(this);
}
@override
@optionalTypeArgs
TResult? mapOrNull<TResult extends Object?>({
TResult? Function(_SlotConfigurationHotp value)? hotp,
TResult? Function(_SlotConfigurationHmacSha1 value)? chalresp,
TResult? Function(_SlotConfigurationStaticPassword value)? static,
TResult? Function(_SlotConfigurationYubiOtp value)? yubiotp,
}) {
return yubiotp?.call(this);
}
@override
@optionalTypeArgs
TResult maybeMap<TResult extends Object?>({
TResult Function(_SlotConfigurationHotp value)? hotp,
TResult Function(_SlotConfigurationHmacSha1 value)? chalresp,
TResult Function(_SlotConfigurationStaticPassword value)? static,
TResult Function(_SlotConfigurationYubiOtp value)? yubiotp,
required TResult orElse(),
}) {
if (yubiotp != null) {
return yubiotp(this);
}
return orElse();
}
@override
Map<String, dynamic> toJson() {
2023-12-13 21:35:17 +03:00
return _$$SlotConfigurationYubiOtpImplToJson(
2023-11-09 16:09:59 +03:00
this,
);
}
}
abstract class _SlotConfigurationYubiOtp extends SlotConfiguration {
const factory _SlotConfigurationYubiOtp(
2023-12-13 21:35:17 +03:00
{required final String publicId,
required final String privateId,
required final String key,
final SlotConfigurationOptions? options}) =
_$SlotConfigurationYubiOtpImpl;
2023-11-09 16:09:59 +03:00
const _SlotConfigurationYubiOtp._() : super._();
factory _SlotConfigurationYubiOtp.fromJson(Map<String, dynamic> json) =
2023-12-13 21:35:17 +03:00
_$SlotConfigurationYubiOtpImpl.fromJson;
2023-11-09 16:09:59 +03:00
String get publicId;
String get privateId;
String get key;
@override
SlotConfigurationOptions? get options;
@override
@JsonKey(ignore: true)
2023-12-13 21:35:17 +03:00
_$$SlotConfigurationYubiOtpImplCopyWith<_$SlotConfigurationYubiOtpImpl>
2023-11-09 16:09:59 +03:00
get copyWith => throw _privateConstructorUsedError;
}