423 lines
14 KiB
Dart
423 lines
14 KiB
Dart
// 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 'session_model.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',
|
|
);
|
|
|
|
Session _$SessionFromJson(Map<String, dynamic> json) {
|
|
return _Session.fromJson(json);
|
|
}
|
|
|
|
/// @nodoc
|
|
mixin _$Session {
|
|
int get id => throw _privateConstructorUsedError;
|
|
@JsonKey(name: 'user_id')
|
|
int? get userId => throw _privateConstructorUsedError;
|
|
@JsonKey(name: 'session_token')
|
|
String? get sessionToken => throw _privateConstructorUsedError;
|
|
@JsonKey(name: 'device_name')
|
|
String get deviceName => throw _privateConstructorUsedError;
|
|
@JsonKey(name: 'ip_address')
|
|
String get ipAddress => throw _privateConstructorUsedError;
|
|
@JsonKey(name: 'app_name')
|
|
String? get appName => throw _privateConstructorUsedError;
|
|
@JsonKey(name: 'app_version')
|
|
String? get appVersion => throw _privateConstructorUsedError;
|
|
String? get platform => throw _privateConstructorUsedError;
|
|
@JsonKey(name: 'created_at')
|
|
DateTime get createdAt => throw _privateConstructorUsedError;
|
|
@JsonKey(name: 'last_active')
|
|
DateTime get lastActive => throw _privateConstructorUsedError;
|
|
@JsonKey(name: 'is_current')
|
|
bool get isCurrent => throw _privateConstructorUsedError;
|
|
|
|
/// Serializes this Session to a JSON map.
|
|
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
|
|
|
/// Create a copy of Session
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
$SessionCopyWith<Session> get copyWith => throw _privateConstructorUsedError;
|
|
}
|
|
|
|
/// @nodoc
|
|
abstract class $SessionCopyWith<$Res> {
|
|
factory $SessionCopyWith(Session value, $Res Function(Session) then) =
|
|
_$SessionCopyWithImpl<$Res, Session>;
|
|
@useResult
|
|
$Res call({
|
|
int id,
|
|
@JsonKey(name: 'user_id') int? userId,
|
|
@JsonKey(name: 'session_token') String? sessionToken,
|
|
@JsonKey(name: 'device_name') String deviceName,
|
|
@JsonKey(name: 'ip_address') String ipAddress,
|
|
@JsonKey(name: 'app_name') String? appName,
|
|
@JsonKey(name: 'app_version') String? appVersion,
|
|
String? platform,
|
|
@JsonKey(name: 'created_at') DateTime createdAt,
|
|
@JsonKey(name: 'last_active') DateTime lastActive,
|
|
@JsonKey(name: 'is_current') bool isCurrent,
|
|
});
|
|
}
|
|
|
|
/// @nodoc
|
|
class _$SessionCopyWithImpl<$Res, $Val extends Session>
|
|
implements $SessionCopyWith<$Res> {
|
|
_$SessionCopyWithImpl(this._value, this._then);
|
|
|
|
// ignore: unused_field
|
|
final $Val _value;
|
|
// ignore: unused_field
|
|
final $Res Function($Val) _then;
|
|
|
|
/// Create a copy of Session
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@pragma('vm:prefer-inline')
|
|
@override
|
|
$Res call({
|
|
Object? id = null,
|
|
Object? userId = freezed,
|
|
Object? sessionToken = freezed,
|
|
Object? deviceName = null,
|
|
Object? ipAddress = null,
|
|
Object? appName = freezed,
|
|
Object? appVersion = freezed,
|
|
Object? platform = freezed,
|
|
Object? createdAt = null,
|
|
Object? lastActive = null,
|
|
Object? isCurrent = null,
|
|
}) {
|
|
return _then(
|
|
_value.copyWith(
|
|
id: null == id
|
|
? _value.id
|
|
: id // ignore: cast_nullable_to_non_nullable
|
|
as int,
|
|
userId: freezed == userId
|
|
? _value.userId
|
|
: userId // ignore: cast_nullable_to_non_nullable
|
|
as int?,
|
|
sessionToken: freezed == sessionToken
|
|
? _value.sessionToken
|
|
: sessionToken // ignore: cast_nullable_to_non_nullable
|
|
as String?,
|
|
deviceName: null == deviceName
|
|
? _value.deviceName
|
|
: deviceName // ignore: cast_nullable_to_non_nullable
|
|
as String,
|
|
ipAddress: null == ipAddress
|
|
? _value.ipAddress
|
|
: ipAddress // ignore: cast_nullable_to_non_nullable
|
|
as String,
|
|
appName: freezed == appName
|
|
? _value.appName
|
|
: appName // ignore: cast_nullable_to_non_nullable
|
|
as String?,
|
|
appVersion: freezed == appVersion
|
|
? _value.appVersion
|
|
: appVersion // ignore: cast_nullable_to_non_nullable
|
|
as String?,
|
|
platform: freezed == platform
|
|
? _value.platform
|
|
: platform // ignore: cast_nullable_to_non_nullable
|
|
as String?,
|
|
createdAt: null == createdAt
|
|
? _value.createdAt
|
|
: createdAt // ignore: cast_nullable_to_non_nullable
|
|
as DateTime,
|
|
lastActive: null == lastActive
|
|
? _value.lastActive
|
|
: lastActive // ignore: cast_nullable_to_non_nullable
|
|
as DateTime,
|
|
isCurrent: null == isCurrent
|
|
? _value.isCurrent
|
|
: isCurrent // ignore: cast_nullable_to_non_nullable
|
|
as bool,
|
|
)
|
|
as $Val,
|
|
);
|
|
}
|
|
}
|
|
|
|
/// @nodoc
|
|
abstract class _$$SessionImplCopyWith<$Res> implements $SessionCopyWith<$Res> {
|
|
factory _$$SessionImplCopyWith(
|
|
_$SessionImpl value,
|
|
$Res Function(_$SessionImpl) then,
|
|
) = __$$SessionImplCopyWithImpl<$Res>;
|
|
@override
|
|
@useResult
|
|
$Res call({
|
|
int id,
|
|
@JsonKey(name: 'user_id') int? userId,
|
|
@JsonKey(name: 'session_token') String? sessionToken,
|
|
@JsonKey(name: 'device_name') String deviceName,
|
|
@JsonKey(name: 'ip_address') String ipAddress,
|
|
@JsonKey(name: 'app_name') String? appName,
|
|
@JsonKey(name: 'app_version') String? appVersion,
|
|
String? platform,
|
|
@JsonKey(name: 'created_at') DateTime createdAt,
|
|
@JsonKey(name: 'last_active') DateTime lastActive,
|
|
@JsonKey(name: 'is_current') bool isCurrent,
|
|
});
|
|
}
|
|
|
|
/// @nodoc
|
|
class __$$SessionImplCopyWithImpl<$Res>
|
|
extends _$SessionCopyWithImpl<$Res, _$SessionImpl>
|
|
implements _$$SessionImplCopyWith<$Res> {
|
|
__$$SessionImplCopyWithImpl(
|
|
_$SessionImpl _value,
|
|
$Res Function(_$SessionImpl) _then,
|
|
) : super(_value, _then);
|
|
|
|
/// Create a copy of Session
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@pragma('vm:prefer-inline')
|
|
@override
|
|
$Res call({
|
|
Object? id = null,
|
|
Object? userId = freezed,
|
|
Object? sessionToken = freezed,
|
|
Object? deviceName = null,
|
|
Object? ipAddress = null,
|
|
Object? appName = freezed,
|
|
Object? appVersion = freezed,
|
|
Object? platform = freezed,
|
|
Object? createdAt = null,
|
|
Object? lastActive = null,
|
|
Object? isCurrent = null,
|
|
}) {
|
|
return _then(
|
|
_$SessionImpl(
|
|
id: null == id
|
|
? _value.id
|
|
: id // ignore: cast_nullable_to_non_nullable
|
|
as int,
|
|
userId: freezed == userId
|
|
? _value.userId
|
|
: userId // ignore: cast_nullable_to_non_nullable
|
|
as int?,
|
|
sessionToken: freezed == sessionToken
|
|
? _value.sessionToken
|
|
: sessionToken // ignore: cast_nullable_to_non_nullable
|
|
as String?,
|
|
deviceName: null == deviceName
|
|
? _value.deviceName
|
|
: deviceName // ignore: cast_nullable_to_non_nullable
|
|
as String,
|
|
ipAddress: null == ipAddress
|
|
? _value.ipAddress
|
|
: ipAddress // ignore: cast_nullable_to_non_nullable
|
|
as String,
|
|
appName: freezed == appName
|
|
? _value.appName
|
|
: appName // ignore: cast_nullable_to_non_nullable
|
|
as String?,
|
|
appVersion: freezed == appVersion
|
|
? _value.appVersion
|
|
: appVersion // ignore: cast_nullable_to_non_nullable
|
|
as String?,
|
|
platform: freezed == platform
|
|
? _value.platform
|
|
: platform // ignore: cast_nullable_to_non_nullable
|
|
as String?,
|
|
createdAt: null == createdAt
|
|
? _value.createdAt
|
|
: createdAt // ignore: cast_nullable_to_non_nullable
|
|
as DateTime,
|
|
lastActive: null == lastActive
|
|
? _value.lastActive
|
|
: lastActive // ignore: cast_nullable_to_non_nullable
|
|
as DateTime,
|
|
isCurrent: null == isCurrent
|
|
? _value.isCurrent
|
|
: isCurrent // ignore: cast_nullable_to_non_nullable
|
|
as bool,
|
|
),
|
|
);
|
|
}
|
|
}
|
|
|
|
/// @nodoc
|
|
@JsonSerializable()
|
|
class _$SessionImpl implements _Session {
|
|
const _$SessionImpl({
|
|
required this.id,
|
|
@JsonKey(name: 'user_id') this.userId,
|
|
@JsonKey(name: 'session_token') this.sessionToken,
|
|
@JsonKey(name: 'device_name') required this.deviceName,
|
|
@JsonKey(name: 'ip_address') required this.ipAddress,
|
|
@JsonKey(name: 'app_name') this.appName,
|
|
@JsonKey(name: 'app_version') this.appVersion,
|
|
this.platform,
|
|
@JsonKey(name: 'created_at') required this.createdAt,
|
|
@JsonKey(name: 'last_active') required this.lastActive,
|
|
@JsonKey(name: 'is_current') required this.isCurrent,
|
|
});
|
|
|
|
factory _$SessionImpl.fromJson(Map<String, dynamic> json) =>
|
|
_$$SessionImplFromJson(json);
|
|
|
|
@override
|
|
final int id;
|
|
@override
|
|
@JsonKey(name: 'user_id')
|
|
final int? userId;
|
|
@override
|
|
@JsonKey(name: 'session_token')
|
|
final String? sessionToken;
|
|
@override
|
|
@JsonKey(name: 'device_name')
|
|
final String deviceName;
|
|
@override
|
|
@JsonKey(name: 'ip_address')
|
|
final String ipAddress;
|
|
@override
|
|
@JsonKey(name: 'app_name')
|
|
final String? appName;
|
|
@override
|
|
@JsonKey(name: 'app_version')
|
|
final String? appVersion;
|
|
@override
|
|
final String? platform;
|
|
@override
|
|
@JsonKey(name: 'created_at')
|
|
final DateTime createdAt;
|
|
@override
|
|
@JsonKey(name: 'last_active')
|
|
final DateTime lastActive;
|
|
@override
|
|
@JsonKey(name: 'is_current')
|
|
final bool isCurrent;
|
|
|
|
@override
|
|
String toString() {
|
|
return 'Session(id: $id, userId: $userId, sessionToken: $sessionToken, deviceName: $deviceName, ipAddress: $ipAddress, appName: $appName, appVersion: $appVersion, platform: $platform, createdAt: $createdAt, lastActive: $lastActive, isCurrent: $isCurrent)';
|
|
}
|
|
|
|
@override
|
|
bool operator ==(Object other) {
|
|
return identical(this, other) ||
|
|
(other.runtimeType == runtimeType &&
|
|
other is _$SessionImpl &&
|
|
(identical(other.id, id) || other.id == id) &&
|
|
(identical(other.userId, userId) || other.userId == userId) &&
|
|
(identical(other.sessionToken, sessionToken) ||
|
|
other.sessionToken == sessionToken) &&
|
|
(identical(other.deviceName, deviceName) ||
|
|
other.deviceName == deviceName) &&
|
|
(identical(other.ipAddress, ipAddress) ||
|
|
other.ipAddress == ipAddress) &&
|
|
(identical(other.appName, appName) || other.appName == appName) &&
|
|
(identical(other.appVersion, appVersion) ||
|
|
other.appVersion == appVersion) &&
|
|
(identical(other.platform, platform) ||
|
|
other.platform == platform) &&
|
|
(identical(other.createdAt, createdAt) ||
|
|
other.createdAt == createdAt) &&
|
|
(identical(other.lastActive, lastActive) ||
|
|
other.lastActive == lastActive) &&
|
|
(identical(other.isCurrent, isCurrent) ||
|
|
other.isCurrent == isCurrent));
|
|
}
|
|
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
@override
|
|
int get hashCode => Object.hash(
|
|
runtimeType,
|
|
id,
|
|
userId,
|
|
sessionToken,
|
|
deviceName,
|
|
ipAddress,
|
|
appName,
|
|
appVersion,
|
|
platform,
|
|
createdAt,
|
|
lastActive,
|
|
isCurrent,
|
|
);
|
|
|
|
/// Create a copy of Session
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
@override
|
|
@pragma('vm:prefer-inline')
|
|
_$$SessionImplCopyWith<_$SessionImpl> get copyWith =>
|
|
__$$SessionImplCopyWithImpl<_$SessionImpl>(this, _$identity);
|
|
|
|
@override
|
|
Map<String, dynamic> toJson() {
|
|
return _$$SessionImplToJson(this);
|
|
}
|
|
}
|
|
|
|
abstract class _Session implements Session {
|
|
const factory _Session({
|
|
required final int id,
|
|
@JsonKey(name: 'user_id') final int? userId,
|
|
@JsonKey(name: 'session_token') final String? sessionToken,
|
|
@JsonKey(name: 'device_name') required final String deviceName,
|
|
@JsonKey(name: 'ip_address') required final String ipAddress,
|
|
@JsonKey(name: 'app_name') final String? appName,
|
|
@JsonKey(name: 'app_version') final String? appVersion,
|
|
final String? platform,
|
|
@JsonKey(name: 'created_at') required final DateTime createdAt,
|
|
@JsonKey(name: 'last_active') required final DateTime lastActive,
|
|
@JsonKey(name: 'is_current') required final bool isCurrent,
|
|
}) = _$SessionImpl;
|
|
|
|
factory _Session.fromJson(Map<String, dynamic> json) = _$SessionImpl.fromJson;
|
|
|
|
@override
|
|
int get id;
|
|
@override
|
|
@JsonKey(name: 'user_id')
|
|
int? get userId;
|
|
@override
|
|
@JsonKey(name: 'session_token')
|
|
String? get sessionToken;
|
|
@override
|
|
@JsonKey(name: 'device_name')
|
|
String get deviceName;
|
|
@override
|
|
@JsonKey(name: 'ip_address')
|
|
String get ipAddress;
|
|
@override
|
|
@JsonKey(name: 'app_name')
|
|
String? get appName;
|
|
@override
|
|
@JsonKey(name: 'app_version')
|
|
String? get appVersion;
|
|
@override
|
|
String? get platform;
|
|
@override
|
|
@JsonKey(name: 'created_at')
|
|
DateTime get createdAt;
|
|
@override
|
|
@JsonKey(name: 'last_active')
|
|
DateTime get lastActive;
|
|
@override
|
|
@JsonKey(name: 'is_current')
|
|
bool get isCurrent;
|
|
|
|
/// Create a copy of Session
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@override
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
_$$SessionImplCopyWith<_$SessionImpl> get copyWith =>
|
|
throw _privateConstructorUsedError;
|
|
}
|