Files
worker/lib/features/auth/data/models/auth_session_model.freezed.dart
2025-11-07 15:55:02 +07:00

1930 lines
62 KiB
Dart

// GENERATED CODE - DO NOT MODIFY BY HAND
// coverage:ignore-file
// 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 'auth_session_model.dart';
// **************************************************************************
// FreezedGenerator
// **************************************************************************
// dart format off
T _$identity<T>(T value) => value;
/// @nodoc
mixin _$AppInfo {
@JsonKey(name: 'app_title') String get appTitle;@JsonKey(name: 'app_endpoint') String get appEndpoint;@JsonKey(name: 'app_logo') String get appLogo;
/// Create a copy of AppInfo
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
$AppInfoCopyWith<AppInfo> get copyWith => _$AppInfoCopyWithImpl<AppInfo>(this as AppInfo, _$identity);
/// Serializes this AppInfo to a JSON map.
Map<String, dynamic> toJson();
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is AppInfo&&(identical(other.appTitle, appTitle) || other.appTitle == appTitle)&&(identical(other.appEndpoint, appEndpoint) || other.appEndpoint == appEndpoint)&&(identical(other.appLogo, appLogo) || other.appLogo == appLogo));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType,appTitle,appEndpoint,appLogo);
@override
String toString() {
return 'AppInfo(appTitle: $appTitle, appEndpoint: $appEndpoint, appLogo: $appLogo)';
}
}
/// @nodoc
abstract mixin class $AppInfoCopyWith<$Res> {
factory $AppInfoCopyWith(AppInfo value, $Res Function(AppInfo) _then) = _$AppInfoCopyWithImpl;
@useResult
$Res call({
@JsonKey(name: 'app_title') String appTitle,@JsonKey(name: 'app_endpoint') String appEndpoint,@JsonKey(name: 'app_logo') String appLogo
});
}
/// @nodoc
class _$AppInfoCopyWithImpl<$Res>
implements $AppInfoCopyWith<$Res> {
_$AppInfoCopyWithImpl(this._self, this._then);
final AppInfo _self;
final $Res Function(AppInfo) _then;
/// Create a copy of AppInfo
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @override $Res call({Object? appTitle = null,Object? appEndpoint = null,Object? appLogo = null,}) {
return _then(_self.copyWith(
appTitle: null == appTitle ? _self.appTitle : appTitle // ignore: cast_nullable_to_non_nullable
as String,appEndpoint: null == appEndpoint ? _self.appEndpoint : appEndpoint // ignore: cast_nullable_to_non_nullable
as String,appLogo: null == appLogo ? _self.appLogo : appLogo // ignore: cast_nullable_to_non_nullable
as String,
));
}
}
/// Adds pattern-matching-related methods to [AppInfo].
extension AppInfoPatterns on AppInfo {
/// A variant of `map` that fallback to returning `orElse`.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case _:
/// return orElse();
/// }
/// ```
@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _AppInfo value)? $default,{required TResult orElse(),}){
final _that = this;
switch (_that) {
case _AppInfo() when $default != null:
return $default(_that);case _:
return orElse();
}
}
/// A `switch`-like method, using callbacks.
///
/// Callbacks receives the raw object, upcasted.
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case final Subclass2 value:
/// return ...;
/// }
/// ```
@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _AppInfo value) $default,){
final _that = this;
switch (_that) {
case _AppInfo():
return $default(_that);}
}
/// A variant of `map` that fallback to returning `null`.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case _:
/// return null;
/// }
/// ```
@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _AppInfo value)? $default,){
final _that = this;
switch (_that) {
case _AppInfo() when $default != null:
return $default(_that);case _:
return null;
}
}
/// A variant of `when` that fallback to an `orElse` callback.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case _:
/// return orElse();
/// }
/// ```
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function(@JsonKey(name: 'app_title') String appTitle, @JsonKey(name: 'app_endpoint') String appEndpoint, @JsonKey(name: 'app_logo') String appLogo)? $default,{required TResult orElse(),}) {final _that = this;
switch (_that) {
case _AppInfo() when $default != null:
return $default(_that.appTitle,_that.appEndpoint,_that.appLogo);case _:
return orElse();
}
}
/// A `switch`-like method, using callbacks.
///
/// As opposed to `map`, this offers destructuring.
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case Subclass2(:final field2):
/// return ...;
/// }
/// ```
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function(@JsonKey(name: 'app_title') String appTitle, @JsonKey(name: 'app_endpoint') String appEndpoint, @JsonKey(name: 'app_logo') String appLogo) $default,) {final _that = this;
switch (_that) {
case _AppInfo():
return $default(_that.appTitle,_that.appEndpoint,_that.appLogo);}
}
/// A variant of `when` that fallback to returning `null`
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case _:
/// return null;
/// }
/// ```
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function(@JsonKey(name: 'app_title') String appTitle, @JsonKey(name: 'app_endpoint') String appEndpoint, @JsonKey(name: 'app_logo') String appLogo)? $default,) {final _that = this;
switch (_that) {
case _AppInfo() when $default != null:
return $default(_that.appTitle,_that.appEndpoint,_that.appLogo);case _:
return null;
}
}
}
/// @nodoc
@JsonSerializable()
class _AppInfo implements AppInfo {
const _AppInfo({@JsonKey(name: 'app_title') required this.appTitle, @JsonKey(name: 'app_endpoint') required this.appEndpoint, @JsonKey(name: 'app_logo') required this.appLogo});
factory _AppInfo.fromJson(Map<String, dynamic> json) => _$AppInfoFromJson(json);
@override@JsonKey(name: 'app_title') final String appTitle;
@override@JsonKey(name: 'app_endpoint') final String appEndpoint;
@override@JsonKey(name: 'app_logo') final String appLogo;
/// Create a copy of AppInfo
/// with the given fields replaced by the non-null parameter values.
@override @JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
_$AppInfoCopyWith<_AppInfo> get copyWith => __$AppInfoCopyWithImpl<_AppInfo>(this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$AppInfoToJson(this, );
}
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is _AppInfo&&(identical(other.appTitle, appTitle) || other.appTitle == appTitle)&&(identical(other.appEndpoint, appEndpoint) || other.appEndpoint == appEndpoint)&&(identical(other.appLogo, appLogo) || other.appLogo == appLogo));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType,appTitle,appEndpoint,appLogo);
@override
String toString() {
return 'AppInfo(appTitle: $appTitle, appEndpoint: $appEndpoint, appLogo: $appLogo)';
}
}
/// @nodoc
abstract mixin class _$AppInfoCopyWith<$Res> implements $AppInfoCopyWith<$Res> {
factory _$AppInfoCopyWith(_AppInfo value, $Res Function(_AppInfo) _then) = __$AppInfoCopyWithImpl;
@override @useResult
$Res call({
@JsonKey(name: 'app_title') String appTitle,@JsonKey(name: 'app_endpoint') String appEndpoint,@JsonKey(name: 'app_logo') String appLogo
});
}
/// @nodoc
class __$AppInfoCopyWithImpl<$Res>
implements _$AppInfoCopyWith<$Res> {
__$AppInfoCopyWithImpl(this._self, this._then);
final _AppInfo _self;
final $Res Function(_AppInfo) _then;
/// Create a copy of AppInfo
/// with the given fields replaced by the non-null parameter values.
@override @pragma('vm:prefer-inline') $Res call({Object? appTitle = null,Object? appEndpoint = null,Object? appLogo = null,}) {
return _then(_AppInfo(
appTitle: null == appTitle ? _self.appTitle : appTitle // ignore: cast_nullable_to_non_nullable
as String,appEndpoint: null == appEndpoint ? _self.appEndpoint : appEndpoint // ignore: cast_nullable_to_non_nullable
as String,appLogo: null == appLogo ? _self.appLogo : appLogo // ignore: cast_nullable_to_non_nullable
as String,
));
}
}
/// @nodoc
mixin _$LoginMessage {
bool get success; String get message; String get sid;@JsonKey(name: 'csrf_token') String get csrfToken; List<AppInfo> get apps;
/// Create a copy of LoginMessage
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
$LoginMessageCopyWith<LoginMessage> get copyWith => _$LoginMessageCopyWithImpl<LoginMessage>(this as LoginMessage, _$identity);
/// Serializes this LoginMessage to a JSON map.
Map<String, dynamic> toJson();
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is LoginMessage&&(identical(other.success, success) || other.success == success)&&(identical(other.message, message) || other.message == message)&&(identical(other.sid, sid) || other.sid == sid)&&(identical(other.csrfToken, csrfToken) || other.csrfToken == csrfToken)&&const DeepCollectionEquality().equals(other.apps, apps));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType,success,message,sid,csrfToken,const DeepCollectionEquality().hash(apps));
@override
String toString() {
return 'LoginMessage(success: $success, message: $message, sid: $sid, csrfToken: $csrfToken, apps: $apps)';
}
}
/// @nodoc
abstract mixin class $LoginMessageCopyWith<$Res> {
factory $LoginMessageCopyWith(LoginMessage value, $Res Function(LoginMessage) _then) = _$LoginMessageCopyWithImpl;
@useResult
$Res call({
bool success, String message, String sid,@JsonKey(name: 'csrf_token') String csrfToken, List<AppInfo> apps
});
}
/// @nodoc
class _$LoginMessageCopyWithImpl<$Res>
implements $LoginMessageCopyWith<$Res> {
_$LoginMessageCopyWithImpl(this._self, this._then);
final LoginMessage _self;
final $Res Function(LoginMessage) _then;
/// Create a copy of LoginMessage
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @override $Res call({Object? success = null,Object? message = null,Object? sid = null,Object? csrfToken = null,Object? apps = null,}) {
return _then(_self.copyWith(
success: null == success ? _self.success : success // ignore: cast_nullable_to_non_nullable
as bool,message: null == message ? _self.message : message // ignore: cast_nullable_to_non_nullable
as String,sid: null == sid ? _self.sid : sid // ignore: cast_nullable_to_non_nullable
as String,csrfToken: null == csrfToken ? _self.csrfToken : csrfToken // ignore: cast_nullable_to_non_nullable
as String,apps: null == apps ? _self.apps : apps // ignore: cast_nullable_to_non_nullable
as List<AppInfo>,
));
}
}
/// Adds pattern-matching-related methods to [LoginMessage].
extension LoginMessagePatterns on LoginMessage {
/// A variant of `map` that fallback to returning `orElse`.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case _:
/// return orElse();
/// }
/// ```
@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _LoginMessage value)? $default,{required TResult orElse(),}){
final _that = this;
switch (_that) {
case _LoginMessage() when $default != null:
return $default(_that);case _:
return orElse();
}
}
/// A `switch`-like method, using callbacks.
///
/// Callbacks receives the raw object, upcasted.
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case final Subclass2 value:
/// return ...;
/// }
/// ```
@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _LoginMessage value) $default,){
final _that = this;
switch (_that) {
case _LoginMessage():
return $default(_that);}
}
/// A variant of `map` that fallback to returning `null`.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case _:
/// return null;
/// }
/// ```
@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _LoginMessage value)? $default,){
final _that = this;
switch (_that) {
case _LoginMessage() when $default != null:
return $default(_that);case _:
return null;
}
}
/// A variant of `when` that fallback to an `orElse` callback.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case _:
/// return orElse();
/// }
/// ```
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( bool success, String message, String sid, @JsonKey(name: 'csrf_token') String csrfToken, List<AppInfo> apps)? $default,{required TResult orElse(),}) {final _that = this;
switch (_that) {
case _LoginMessage() when $default != null:
return $default(_that.success,_that.message,_that.sid,_that.csrfToken,_that.apps);case _:
return orElse();
}
}
/// A `switch`-like method, using callbacks.
///
/// As opposed to `map`, this offers destructuring.
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case Subclass2(:final field2):
/// return ...;
/// }
/// ```
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( bool success, String message, String sid, @JsonKey(name: 'csrf_token') String csrfToken, List<AppInfo> apps) $default,) {final _that = this;
switch (_that) {
case _LoginMessage():
return $default(_that.success,_that.message,_that.sid,_that.csrfToken,_that.apps);}
}
/// A variant of `when` that fallback to returning `null`
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case _:
/// return null;
/// }
/// ```
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( bool success, String message, String sid, @JsonKey(name: 'csrf_token') String csrfToken, List<AppInfo> apps)? $default,) {final _that = this;
switch (_that) {
case _LoginMessage() when $default != null:
return $default(_that.success,_that.message,_that.sid,_that.csrfToken,_that.apps);case _:
return null;
}
}
}
/// @nodoc
@JsonSerializable()
class _LoginMessage implements LoginMessage {
const _LoginMessage({required this.success, required this.message, required this.sid, @JsonKey(name: 'csrf_token') required this.csrfToken, final List<AppInfo> apps = const []}): _apps = apps;
factory _LoginMessage.fromJson(Map<String, dynamic> json) => _$LoginMessageFromJson(json);
@override final bool success;
@override final String message;
@override final String sid;
@override@JsonKey(name: 'csrf_token') final String csrfToken;
final List<AppInfo> _apps;
@override@JsonKey() List<AppInfo> get apps {
if (_apps is EqualUnmodifiableListView) return _apps;
// ignore: implicit_dynamic_type
return EqualUnmodifiableListView(_apps);
}
/// Create a copy of LoginMessage
/// with the given fields replaced by the non-null parameter values.
@override @JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
_$LoginMessageCopyWith<_LoginMessage> get copyWith => __$LoginMessageCopyWithImpl<_LoginMessage>(this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$LoginMessageToJson(this, );
}
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is _LoginMessage&&(identical(other.success, success) || other.success == success)&&(identical(other.message, message) || other.message == message)&&(identical(other.sid, sid) || other.sid == sid)&&(identical(other.csrfToken, csrfToken) || other.csrfToken == csrfToken)&&const DeepCollectionEquality().equals(other._apps, _apps));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType,success,message,sid,csrfToken,const DeepCollectionEquality().hash(_apps));
@override
String toString() {
return 'LoginMessage(success: $success, message: $message, sid: $sid, csrfToken: $csrfToken, apps: $apps)';
}
}
/// @nodoc
abstract mixin class _$LoginMessageCopyWith<$Res> implements $LoginMessageCopyWith<$Res> {
factory _$LoginMessageCopyWith(_LoginMessage value, $Res Function(_LoginMessage) _then) = __$LoginMessageCopyWithImpl;
@override @useResult
$Res call({
bool success, String message, String sid,@JsonKey(name: 'csrf_token') String csrfToken, List<AppInfo> apps
});
}
/// @nodoc
class __$LoginMessageCopyWithImpl<$Res>
implements _$LoginMessageCopyWith<$Res> {
__$LoginMessageCopyWithImpl(this._self, this._then);
final _LoginMessage _self;
final $Res Function(_LoginMessage) _then;
/// Create a copy of LoginMessage
/// with the given fields replaced by the non-null parameter values.
@override @pragma('vm:prefer-inline') $Res call({Object? success = null,Object? message = null,Object? sid = null,Object? csrfToken = null,Object? apps = null,}) {
return _then(_LoginMessage(
success: null == success ? _self.success : success // ignore: cast_nullable_to_non_nullable
as bool,message: null == message ? _self.message : message // ignore: cast_nullable_to_non_nullable
as String,sid: null == sid ? _self.sid : sid // ignore: cast_nullable_to_non_nullable
as String,csrfToken: null == csrfToken ? _self.csrfToken : csrfToken // ignore: cast_nullable_to_non_nullable
as String,apps: null == apps ? _self._apps : apps // ignore: cast_nullable_to_non_nullable
as List<AppInfo>,
));
}
}
/// @nodoc
mixin _$AuthSessionResponse {
@JsonKey(name: 'session_expired') int get sessionExpired; LoginMessage get message;@JsonKey(name: 'home_page') String get homePage;@JsonKey(name: 'full_name') String get fullName;
/// Create a copy of AuthSessionResponse
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
$AuthSessionResponseCopyWith<AuthSessionResponse> get copyWith => _$AuthSessionResponseCopyWithImpl<AuthSessionResponse>(this as AuthSessionResponse, _$identity);
/// Serializes this AuthSessionResponse to a JSON map.
Map<String, dynamic> toJson();
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is AuthSessionResponse&&(identical(other.sessionExpired, sessionExpired) || other.sessionExpired == sessionExpired)&&(identical(other.message, message) || other.message == message)&&(identical(other.homePage, homePage) || other.homePage == homePage)&&(identical(other.fullName, fullName) || other.fullName == fullName));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType,sessionExpired,message,homePage,fullName);
@override
String toString() {
return 'AuthSessionResponse(sessionExpired: $sessionExpired, message: $message, homePage: $homePage, fullName: $fullName)';
}
}
/// @nodoc
abstract mixin class $AuthSessionResponseCopyWith<$Res> {
factory $AuthSessionResponseCopyWith(AuthSessionResponse value, $Res Function(AuthSessionResponse) _then) = _$AuthSessionResponseCopyWithImpl;
@useResult
$Res call({
@JsonKey(name: 'session_expired') int sessionExpired, LoginMessage message,@JsonKey(name: 'home_page') String homePage,@JsonKey(name: 'full_name') String fullName
});
$LoginMessageCopyWith<$Res> get message;
}
/// @nodoc
class _$AuthSessionResponseCopyWithImpl<$Res>
implements $AuthSessionResponseCopyWith<$Res> {
_$AuthSessionResponseCopyWithImpl(this._self, this._then);
final AuthSessionResponse _self;
final $Res Function(AuthSessionResponse) _then;
/// Create a copy of AuthSessionResponse
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @override $Res call({Object? sessionExpired = null,Object? message = null,Object? homePage = null,Object? fullName = null,}) {
return _then(_self.copyWith(
sessionExpired: null == sessionExpired ? _self.sessionExpired : sessionExpired // ignore: cast_nullable_to_non_nullable
as int,message: null == message ? _self.message : message // ignore: cast_nullable_to_non_nullable
as LoginMessage,homePage: null == homePage ? _self.homePage : homePage // ignore: cast_nullable_to_non_nullable
as String,fullName: null == fullName ? _self.fullName : fullName // ignore: cast_nullable_to_non_nullable
as String,
));
}
/// Create a copy of AuthSessionResponse
/// with the given fields replaced by the non-null parameter values.
@override
@pragma('vm:prefer-inline')
$LoginMessageCopyWith<$Res> get message {
return $LoginMessageCopyWith<$Res>(_self.message, (value) {
return _then(_self.copyWith(message: value));
});
}
}
/// Adds pattern-matching-related methods to [AuthSessionResponse].
extension AuthSessionResponsePatterns on AuthSessionResponse {
/// A variant of `map` that fallback to returning `orElse`.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case _:
/// return orElse();
/// }
/// ```
@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _AuthSessionResponse value)? $default,{required TResult orElse(),}){
final _that = this;
switch (_that) {
case _AuthSessionResponse() when $default != null:
return $default(_that);case _:
return orElse();
}
}
/// A `switch`-like method, using callbacks.
///
/// Callbacks receives the raw object, upcasted.
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case final Subclass2 value:
/// return ...;
/// }
/// ```
@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _AuthSessionResponse value) $default,){
final _that = this;
switch (_that) {
case _AuthSessionResponse():
return $default(_that);}
}
/// A variant of `map` that fallback to returning `null`.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case _:
/// return null;
/// }
/// ```
@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _AuthSessionResponse value)? $default,){
final _that = this;
switch (_that) {
case _AuthSessionResponse() when $default != null:
return $default(_that);case _:
return null;
}
}
/// A variant of `when` that fallback to an `orElse` callback.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case _:
/// return orElse();
/// }
/// ```
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function(@JsonKey(name: 'session_expired') int sessionExpired, LoginMessage message, @JsonKey(name: 'home_page') String homePage, @JsonKey(name: 'full_name') String fullName)? $default,{required TResult orElse(),}) {final _that = this;
switch (_that) {
case _AuthSessionResponse() when $default != null:
return $default(_that.sessionExpired,_that.message,_that.homePage,_that.fullName);case _:
return orElse();
}
}
/// A `switch`-like method, using callbacks.
///
/// As opposed to `map`, this offers destructuring.
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case Subclass2(:final field2):
/// return ...;
/// }
/// ```
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function(@JsonKey(name: 'session_expired') int sessionExpired, LoginMessage message, @JsonKey(name: 'home_page') String homePage, @JsonKey(name: 'full_name') String fullName) $default,) {final _that = this;
switch (_that) {
case _AuthSessionResponse():
return $default(_that.sessionExpired,_that.message,_that.homePage,_that.fullName);}
}
/// A variant of `when` that fallback to returning `null`
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case _:
/// return null;
/// }
/// ```
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function(@JsonKey(name: 'session_expired') int sessionExpired, LoginMessage message, @JsonKey(name: 'home_page') String homePage, @JsonKey(name: 'full_name') String fullName)? $default,) {final _that = this;
switch (_that) {
case _AuthSessionResponse() when $default != null:
return $default(_that.sessionExpired,_that.message,_that.homePage,_that.fullName);case _:
return null;
}
}
}
/// @nodoc
@JsonSerializable()
class _AuthSessionResponse implements AuthSessionResponse {
const _AuthSessionResponse({@JsonKey(name: 'session_expired') required this.sessionExpired, required this.message, @JsonKey(name: 'home_page') required this.homePage, @JsonKey(name: 'full_name') required this.fullName});
factory _AuthSessionResponse.fromJson(Map<String, dynamic> json) => _$AuthSessionResponseFromJson(json);
@override@JsonKey(name: 'session_expired') final int sessionExpired;
@override final LoginMessage message;
@override@JsonKey(name: 'home_page') final String homePage;
@override@JsonKey(name: 'full_name') final String fullName;
/// Create a copy of AuthSessionResponse
/// with the given fields replaced by the non-null parameter values.
@override @JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
_$AuthSessionResponseCopyWith<_AuthSessionResponse> get copyWith => __$AuthSessionResponseCopyWithImpl<_AuthSessionResponse>(this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$AuthSessionResponseToJson(this, );
}
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is _AuthSessionResponse&&(identical(other.sessionExpired, sessionExpired) || other.sessionExpired == sessionExpired)&&(identical(other.message, message) || other.message == message)&&(identical(other.homePage, homePage) || other.homePage == homePage)&&(identical(other.fullName, fullName) || other.fullName == fullName));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType,sessionExpired,message,homePage,fullName);
@override
String toString() {
return 'AuthSessionResponse(sessionExpired: $sessionExpired, message: $message, homePage: $homePage, fullName: $fullName)';
}
}
/// @nodoc
abstract mixin class _$AuthSessionResponseCopyWith<$Res> implements $AuthSessionResponseCopyWith<$Res> {
factory _$AuthSessionResponseCopyWith(_AuthSessionResponse value, $Res Function(_AuthSessionResponse) _then) = __$AuthSessionResponseCopyWithImpl;
@override @useResult
$Res call({
@JsonKey(name: 'session_expired') int sessionExpired, LoginMessage message,@JsonKey(name: 'home_page') String homePage,@JsonKey(name: 'full_name') String fullName
});
@override $LoginMessageCopyWith<$Res> get message;
}
/// @nodoc
class __$AuthSessionResponseCopyWithImpl<$Res>
implements _$AuthSessionResponseCopyWith<$Res> {
__$AuthSessionResponseCopyWithImpl(this._self, this._then);
final _AuthSessionResponse _self;
final $Res Function(_AuthSessionResponse) _then;
/// Create a copy of AuthSessionResponse
/// with the given fields replaced by the non-null parameter values.
@override @pragma('vm:prefer-inline') $Res call({Object? sessionExpired = null,Object? message = null,Object? homePage = null,Object? fullName = null,}) {
return _then(_AuthSessionResponse(
sessionExpired: null == sessionExpired ? _self.sessionExpired : sessionExpired // ignore: cast_nullable_to_non_nullable
as int,message: null == message ? _self.message : message // ignore: cast_nullable_to_non_nullable
as LoginMessage,homePage: null == homePage ? _self.homePage : homePage // ignore: cast_nullable_to_non_nullable
as String,fullName: null == fullName ? _self.fullName : fullName // ignore: cast_nullable_to_non_nullable
as String,
));
}
/// Create a copy of AuthSessionResponse
/// with the given fields replaced by the non-null parameter values.
@override
@pragma('vm:prefer-inline')
$LoginMessageCopyWith<$Res> get message {
return $LoginMessageCopyWith<$Res>(_self.message, (value) {
return _then(_self.copyWith(message: value));
});
}
}
/// @nodoc
mixin _$GetSessionData {
String get sid;@JsonKey(name: 'csrf_token') String get csrfToken;
/// Create a copy of GetSessionData
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
$GetSessionDataCopyWith<GetSessionData> get copyWith => _$GetSessionDataCopyWithImpl<GetSessionData>(this as GetSessionData, _$identity);
/// Serializes this GetSessionData to a JSON map.
Map<String, dynamic> toJson();
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is GetSessionData&&(identical(other.sid, sid) || other.sid == sid)&&(identical(other.csrfToken, csrfToken) || other.csrfToken == csrfToken));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType,sid,csrfToken);
@override
String toString() {
return 'GetSessionData(sid: $sid, csrfToken: $csrfToken)';
}
}
/// @nodoc
abstract mixin class $GetSessionDataCopyWith<$Res> {
factory $GetSessionDataCopyWith(GetSessionData value, $Res Function(GetSessionData) _then) = _$GetSessionDataCopyWithImpl;
@useResult
$Res call({
String sid,@JsonKey(name: 'csrf_token') String csrfToken
});
}
/// @nodoc
class _$GetSessionDataCopyWithImpl<$Res>
implements $GetSessionDataCopyWith<$Res> {
_$GetSessionDataCopyWithImpl(this._self, this._then);
final GetSessionData _self;
final $Res Function(GetSessionData) _then;
/// Create a copy of GetSessionData
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @override $Res call({Object? sid = null,Object? csrfToken = null,}) {
return _then(_self.copyWith(
sid: null == sid ? _self.sid : sid // ignore: cast_nullable_to_non_nullable
as String,csrfToken: null == csrfToken ? _self.csrfToken : csrfToken // ignore: cast_nullable_to_non_nullable
as String,
));
}
}
/// Adds pattern-matching-related methods to [GetSessionData].
extension GetSessionDataPatterns on GetSessionData {
/// A variant of `map` that fallback to returning `orElse`.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case _:
/// return orElse();
/// }
/// ```
@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _GetSessionData value)? $default,{required TResult orElse(),}){
final _that = this;
switch (_that) {
case _GetSessionData() when $default != null:
return $default(_that);case _:
return orElse();
}
}
/// A `switch`-like method, using callbacks.
///
/// Callbacks receives the raw object, upcasted.
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case final Subclass2 value:
/// return ...;
/// }
/// ```
@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _GetSessionData value) $default,){
final _that = this;
switch (_that) {
case _GetSessionData():
return $default(_that);}
}
/// A variant of `map` that fallback to returning `null`.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case _:
/// return null;
/// }
/// ```
@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _GetSessionData value)? $default,){
final _that = this;
switch (_that) {
case _GetSessionData() when $default != null:
return $default(_that);case _:
return null;
}
}
/// A variant of `when` that fallback to an `orElse` callback.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case _:
/// return orElse();
/// }
/// ```
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( String sid, @JsonKey(name: 'csrf_token') String csrfToken)? $default,{required TResult orElse(),}) {final _that = this;
switch (_that) {
case _GetSessionData() when $default != null:
return $default(_that.sid,_that.csrfToken);case _:
return orElse();
}
}
/// A `switch`-like method, using callbacks.
///
/// As opposed to `map`, this offers destructuring.
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case Subclass2(:final field2):
/// return ...;
/// }
/// ```
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( String sid, @JsonKey(name: 'csrf_token') String csrfToken) $default,) {final _that = this;
switch (_that) {
case _GetSessionData():
return $default(_that.sid,_that.csrfToken);}
}
/// A variant of `when` that fallback to returning `null`
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case _:
/// return null;
/// }
/// ```
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( String sid, @JsonKey(name: 'csrf_token') String csrfToken)? $default,) {final _that = this;
switch (_that) {
case _GetSessionData() when $default != null:
return $default(_that.sid,_that.csrfToken);case _:
return null;
}
}
}
/// @nodoc
@JsonSerializable()
class _GetSessionData implements GetSessionData {
const _GetSessionData({required this.sid, @JsonKey(name: 'csrf_token') required this.csrfToken});
factory _GetSessionData.fromJson(Map<String, dynamic> json) => _$GetSessionDataFromJson(json);
@override final String sid;
@override@JsonKey(name: 'csrf_token') final String csrfToken;
/// Create a copy of GetSessionData
/// with the given fields replaced by the non-null parameter values.
@override @JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
_$GetSessionDataCopyWith<_GetSessionData> get copyWith => __$GetSessionDataCopyWithImpl<_GetSessionData>(this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$GetSessionDataToJson(this, );
}
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is _GetSessionData&&(identical(other.sid, sid) || other.sid == sid)&&(identical(other.csrfToken, csrfToken) || other.csrfToken == csrfToken));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType,sid,csrfToken);
@override
String toString() {
return 'GetSessionData(sid: $sid, csrfToken: $csrfToken)';
}
}
/// @nodoc
abstract mixin class _$GetSessionDataCopyWith<$Res> implements $GetSessionDataCopyWith<$Res> {
factory _$GetSessionDataCopyWith(_GetSessionData value, $Res Function(_GetSessionData) _then) = __$GetSessionDataCopyWithImpl;
@override @useResult
$Res call({
String sid,@JsonKey(name: 'csrf_token') String csrfToken
});
}
/// @nodoc
class __$GetSessionDataCopyWithImpl<$Res>
implements _$GetSessionDataCopyWith<$Res> {
__$GetSessionDataCopyWithImpl(this._self, this._then);
final _GetSessionData _self;
final $Res Function(_GetSessionData) _then;
/// Create a copy of GetSessionData
/// with the given fields replaced by the non-null parameter values.
@override @pragma('vm:prefer-inline') $Res call({Object? sid = null,Object? csrfToken = null,}) {
return _then(_GetSessionData(
sid: null == sid ? _self.sid : sid // ignore: cast_nullable_to_non_nullable
as String,csrfToken: null == csrfToken ? _self.csrfToken : csrfToken // ignore: cast_nullable_to_non_nullable
as String,
));
}
}
/// @nodoc
mixin _$GetSessionMessage {
GetSessionData get data;
/// Create a copy of GetSessionMessage
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
$GetSessionMessageCopyWith<GetSessionMessage> get copyWith => _$GetSessionMessageCopyWithImpl<GetSessionMessage>(this as GetSessionMessage, _$identity);
/// Serializes this GetSessionMessage to a JSON map.
Map<String, dynamic> toJson();
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is GetSessionMessage&&(identical(other.data, data) || other.data == data));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType,data);
@override
String toString() {
return 'GetSessionMessage(data: $data)';
}
}
/// @nodoc
abstract mixin class $GetSessionMessageCopyWith<$Res> {
factory $GetSessionMessageCopyWith(GetSessionMessage value, $Res Function(GetSessionMessage) _then) = _$GetSessionMessageCopyWithImpl;
@useResult
$Res call({
GetSessionData data
});
$GetSessionDataCopyWith<$Res> get data;
}
/// @nodoc
class _$GetSessionMessageCopyWithImpl<$Res>
implements $GetSessionMessageCopyWith<$Res> {
_$GetSessionMessageCopyWithImpl(this._self, this._then);
final GetSessionMessage _self;
final $Res Function(GetSessionMessage) _then;
/// Create a copy of GetSessionMessage
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @override $Res call({Object? data = null,}) {
return _then(_self.copyWith(
data: null == data ? _self.data : data // ignore: cast_nullable_to_non_nullable
as GetSessionData,
));
}
/// Create a copy of GetSessionMessage
/// with the given fields replaced by the non-null parameter values.
@override
@pragma('vm:prefer-inline')
$GetSessionDataCopyWith<$Res> get data {
return $GetSessionDataCopyWith<$Res>(_self.data, (value) {
return _then(_self.copyWith(data: value));
});
}
}
/// Adds pattern-matching-related methods to [GetSessionMessage].
extension GetSessionMessagePatterns on GetSessionMessage {
/// A variant of `map` that fallback to returning `orElse`.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case _:
/// return orElse();
/// }
/// ```
@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _GetSessionMessage value)? $default,{required TResult orElse(),}){
final _that = this;
switch (_that) {
case _GetSessionMessage() when $default != null:
return $default(_that);case _:
return orElse();
}
}
/// A `switch`-like method, using callbacks.
///
/// Callbacks receives the raw object, upcasted.
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case final Subclass2 value:
/// return ...;
/// }
/// ```
@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _GetSessionMessage value) $default,){
final _that = this;
switch (_that) {
case _GetSessionMessage():
return $default(_that);}
}
/// A variant of `map` that fallback to returning `null`.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case _:
/// return null;
/// }
/// ```
@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _GetSessionMessage value)? $default,){
final _that = this;
switch (_that) {
case _GetSessionMessage() when $default != null:
return $default(_that);case _:
return null;
}
}
/// A variant of `when` that fallback to an `orElse` callback.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case _:
/// return orElse();
/// }
/// ```
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( GetSessionData data)? $default,{required TResult orElse(),}) {final _that = this;
switch (_that) {
case _GetSessionMessage() when $default != null:
return $default(_that.data);case _:
return orElse();
}
}
/// A `switch`-like method, using callbacks.
///
/// As opposed to `map`, this offers destructuring.
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case Subclass2(:final field2):
/// return ...;
/// }
/// ```
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( GetSessionData data) $default,) {final _that = this;
switch (_that) {
case _GetSessionMessage():
return $default(_that.data);}
}
/// A variant of `when` that fallback to returning `null`
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case _:
/// return null;
/// }
/// ```
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( GetSessionData data)? $default,) {final _that = this;
switch (_that) {
case _GetSessionMessage() when $default != null:
return $default(_that.data);case _:
return null;
}
}
}
/// @nodoc
@JsonSerializable()
class _GetSessionMessage implements GetSessionMessage {
const _GetSessionMessage({required this.data});
factory _GetSessionMessage.fromJson(Map<String, dynamic> json) => _$GetSessionMessageFromJson(json);
@override final GetSessionData data;
/// Create a copy of GetSessionMessage
/// with the given fields replaced by the non-null parameter values.
@override @JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
_$GetSessionMessageCopyWith<_GetSessionMessage> get copyWith => __$GetSessionMessageCopyWithImpl<_GetSessionMessage>(this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$GetSessionMessageToJson(this, );
}
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is _GetSessionMessage&&(identical(other.data, data) || other.data == data));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType,data);
@override
String toString() {
return 'GetSessionMessage(data: $data)';
}
}
/// @nodoc
abstract mixin class _$GetSessionMessageCopyWith<$Res> implements $GetSessionMessageCopyWith<$Res> {
factory _$GetSessionMessageCopyWith(_GetSessionMessage value, $Res Function(_GetSessionMessage) _then) = __$GetSessionMessageCopyWithImpl;
@override @useResult
$Res call({
GetSessionData data
});
@override $GetSessionDataCopyWith<$Res> get data;
}
/// @nodoc
class __$GetSessionMessageCopyWithImpl<$Res>
implements _$GetSessionMessageCopyWith<$Res> {
__$GetSessionMessageCopyWithImpl(this._self, this._then);
final _GetSessionMessage _self;
final $Res Function(_GetSessionMessage) _then;
/// Create a copy of GetSessionMessage
/// with the given fields replaced by the non-null parameter values.
@override @pragma('vm:prefer-inline') $Res call({Object? data = null,}) {
return _then(_GetSessionMessage(
data: null == data ? _self.data : data // ignore: cast_nullable_to_non_nullable
as GetSessionData,
));
}
/// Create a copy of GetSessionMessage
/// with the given fields replaced by the non-null parameter values.
@override
@pragma('vm:prefer-inline')
$GetSessionDataCopyWith<$Res> get data {
return $GetSessionDataCopyWith<$Res>(_self.data, (value) {
return _then(_self.copyWith(data: value));
});
}
}
/// @nodoc
mixin _$GetSessionResponse {
GetSessionMessage get message;@JsonKey(name: 'home_page') String get homePage;@JsonKey(name: 'full_name') String get fullName;
/// Create a copy of GetSessionResponse
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
$GetSessionResponseCopyWith<GetSessionResponse> get copyWith => _$GetSessionResponseCopyWithImpl<GetSessionResponse>(this as GetSessionResponse, _$identity);
/// Serializes this GetSessionResponse to a JSON map.
Map<String, dynamic> toJson();
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is GetSessionResponse&&(identical(other.message, message) || other.message == message)&&(identical(other.homePage, homePage) || other.homePage == homePage)&&(identical(other.fullName, fullName) || other.fullName == fullName));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType,message,homePage,fullName);
@override
String toString() {
return 'GetSessionResponse(message: $message, homePage: $homePage, fullName: $fullName)';
}
}
/// @nodoc
abstract mixin class $GetSessionResponseCopyWith<$Res> {
factory $GetSessionResponseCopyWith(GetSessionResponse value, $Res Function(GetSessionResponse) _then) = _$GetSessionResponseCopyWithImpl;
@useResult
$Res call({
GetSessionMessage message,@JsonKey(name: 'home_page') String homePage,@JsonKey(name: 'full_name') String fullName
});
$GetSessionMessageCopyWith<$Res> get message;
}
/// @nodoc
class _$GetSessionResponseCopyWithImpl<$Res>
implements $GetSessionResponseCopyWith<$Res> {
_$GetSessionResponseCopyWithImpl(this._self, this._then);
final GetSessionResponse _self;
final $Res Function(GetSessionResponse) _then;
/// Create a copy of GetSessionResponse
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @override $Res call({Object? message = null,Object? homePage = null,Object? fullName = null,}) {
return _then(_self.copyWith(
message: null == message ? _self.message : message // ignore: cast_nullable_to_non_nullable
as GetSessionMessage,homePage: null == homePage ? _self.homePage : homePage // ignore: cast_nullable_to_non_nullable
as String,fullName: null == fullName ? _self.fullName : fullName // ignore: cast_nullable_to_non_nullable
as String,
));
}
/// Create a copy of GetSessionResponse
/// with the given fields replaced by the non-null parameter values.
@override
@pragma('vm:prefer-inline')
$GetSessionMessageCopyWith<$Res> get message {
return $GetSessionMessageCopyWith<$Res>(_self.message, (value) {
return _then(_self.copyWith(message: value));
});
}
}
/// Adds pattern-matching-related methods to [GetSessionResponse].
extension GetSessionResponsePatterns on GetSessionResponse {
/// A variant of `map` that fallback to returning `orElse`.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case _:
/// return orElse();
/// }
/// ```
@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _GetSessionResponse value)? $default,{required TResult orElse(),}){
final _that = this;
switch (_that) {
case _GetSessionResponse() when $default != null:
return $default(_that);case _:
return orElse();
}
}
/// A `switch`-like method, using callbacks.
///
/// Callbacks receives the raw object, upcasted.
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case final Subclass2 value:
/// return ...;
/// }
/// ```
@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _GetSessionResponse value) $default,){
final _that = this;
switch (_that) {
case _GetSessionResponse():
return $default(_that);}
}
/// A variant of `map` that fallback to returning `null`.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case _:
/// return null;
/// }
/// ```
@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _GetSessionResponse value)? $default,){
final _that = this;
switch (_that) {
case _GetSessionResponse() when $default != null:
return $default(_that);case _:
return null;
}
}
/// A variant of `when` that fallback to an `orElse` callback.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case _:
/// return orElse();
/// }
/// ```
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( GetSessionMessage message, @JsonKey(name: 'home_page') String homePage, @JsonKey(name: 'full_name') String fullName)? $default,{required TResult orElse(),}) {final _that = this;
switch (_that) {
case _GetSessionResponse() when $default != null:
return $default(_that.message,_that.homePage,_that.fullName);case _:
return orElse();
}
}
/// A `switch`-like method, using callbacks.
///
/// As opposed to `map`, this offers destructuring.
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case Subclass2(:final field2):
/// return ...;
/// }
/// ```
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( GetSessionMessage message, @JsonKey(name: 'home_page') String homePage, @JsonKey(name: 'full_name') String fullName) $default,) {final _that = this;
switch (_that) {
case _GetSessionResponse():
return $default(_that.message,_that.homePage,_that.fullName);}
}
/// A variant of `when` that fallback to returning `null`
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case _:
/// return null;
/// }
/// ```
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( GetSessionMessage message, @JsonKey(name: 'home_page') String homePage, @JsonKey(name: 'full_name') String fullName)? $default,) {final _that = this;
switch (_that) {
case _GetSessionResponse() when $default != null:
return $default(_that.message,_that.homePage,_that.fullName);case _:
return null;
}
}
}
/// @nodoc
@JsonSerializable()
class _GetSessionResponse implements GetSessionResponse {
const _GetSessionResponse({required this.message, @JsonKey(name: 'home_page') required this.homePage, @JsonKey(name: 'full_name') required this.fullName});
factory _GetSessionResponse.fromJson(Map<String, dynamic> json) => _$GetSessionResponseFromJson(json);
@override final GetSessionMessage message;
@override@JsonKey(name: 'home_page') final String homePage;
@override@JsonKey(name: 'full_name') final String fullName;
/// Create a copy of GetSessionResponse
/// with the given fields replaced by the non-null parameter values.
@override @JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
_$GetSessionResponseCopyWith<_GetSessionResponse> get copyWith => __$GetSessionResponseCopyWithImpl<_GetSessionResponse>(this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$GetSessionResponseToJson(this, );
}
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is _GetSessionResponse&&(identical(other.message, message) || other.message == message)&&(identical(other.homePage, homePage) || other.homePage == homePage)&&(identical(other.fullName, fullName) || other.fullName == fullName));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType,message,homePage,fullName);
@override
String toString() {
return 'GetSessionResponse(message: $message, homePage: $homePage, fullName: $fullName)';
}
}
/// @nodoc
abstract mixin class _$GetSessionResponseCopyWith<$Res> implements $GetSessionResponseCopyWith<$Res> {
factory _$GetSessionResponseCopyWith(_GetSessionResponse value, $Res Function(_GetSessionResponse) _then) = __$GetSessionResponseCopyWithImpl;
@override @useResult
$Res call({
GetSessionMessage message,@JsonKey(name: 'home_page') String homePage,@JsonKey(name: 'full_name') String fullName
});
@override $GetSessionMessageCopyWith<$Res> get message;
}
/// @nodoc
class __$GetSessionResponseCopyWithImpl<$Res>
implements _$GetSessionResponseCopyWith<$Res> {
__$GetSessionResponseCopyWithImpl(this._self, this._then);
final _GetSessionResponse _self;
final $Res Function(_GetSessionResponse) _then;
/// Create a copy of GetSessionResponse
/// with the given fields replaced by the non-null parameter values.
@override @pragma('vm:prefer-inline') $Res call({Object? message = null,Object? homePage = null,Object? fullName = null,}) {
return _then(_GetSessionResponse(
message: null == message ? _self.message : message // ignore: cast_nullable_to_non_nullable
as GetSessionMessage,homePage: null == homePage ? _self.homePage : homePage // ignore: cast_nullable_to_non_nullable
as String,fullName: null == fullName ? _self.fullName : fullName // ignore: cast_nullable_to_non_nullable
as String,
));
}
/// Create a copy of GetSessionResponse
/// with the given fields replaced by the non-null parameter values.
@override
@pragma('vm:prefer-inline')
$GetSessionMessageCopyWith<$Res> get message {
return $GetSessionMessageCopyWith<$Res>(_self.message, (value) {
return _then(_self.copyWith(message: value));
});
}
}
/// @nodoc
mixin _$SessionData {
String get sid; String get csrfToken; String get fullName; DateTime get createdAt; List<AppInfo>? get apps;
/// Create a copy of SessionData
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
$SessionDataCopyWith<SessionData> get copyWith => _$SessionDataCopyWithImpl<SessionData>(this as SessionData, _$identity);
/// Serializes this SessionData to a JSON map.
Map<String, dynamic> toJson();
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is SessionData&&(identical(other.sid, sid) || other.sid == sid)&&(identical(other.csrfToken, csrfToken) || other.csrfToken == csrfToken)&&(identical(other.fullName, fullName) || other.fullName == fullName)&&(identical(other.createdAt, createdAt) || other.createdAt == createdAt)&&const DeepCollectionEquality().equals(other.apps, apps));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType,sid,csrfToken,fullName,createdAt,const DeepCollectionEquality().hash(apps));
@override
String toString() {
return 'SessionData(sid: $sid, csrfToken: $csrfToken, fullName: $fullName, createdAt: $createdAt, apps: $apps)';
}
}
/// @nodoc
abstract mixin class $SessionDataCopyWith<$Res> {
factory $SessionDataCopyWith(SessionData value, $Res Function(SessionData) _then) = _$SessionDataCopyWithImpl;
@useResult
$Res call({
String sid, String csrfToken, String fullName, DateTime createdAt, List<AppInfo>? apps
});
}
/// @nodoc
class _$SessionDataCopyWithImpl<$Res>
implements $SessionDataCopyWith<$Res> {
_$SessionDataCopyWithImpl(this._self, this._then);
final SessionData _self;
final $Res Function(SessionData) _then;
/// Create a copy of SessionData
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @override $Res call({Object? sid = null,Object? csrfToken = null,Object? fullName = null,Object? createdAt = null,Object? apps = freezed,}) {
return _then(_self.copyWith(
sid: null == sid ? _self.sid : sid // ignore: cast_nullable_to_non_nullable
as String,csrfToken: null == csrfToken ? _self.csrfToken : csrfToken // ignore: cast_nullable_to_non_nullable
as String,fullName: null == fullName ? _self.fullName : fullName // ignore: cast_nullable_to_non_nullable
as String,createdAt: null == createdAt ? _self.createdAt : createdAt // ignore: cast_nullable_to_non_nullable
as DateTime,apps: freezed == apps ? _self.apps : apps // ignore: cast_nullable_to_non_nullable
as List<AppInfo>?,
));
}
}
/// Adds pattern-matching-related methods to [SessionData].
extension SessionDataPatterns on SessionData {
/// A variant of `map` that fallback to returning `orElse`.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case _:
/// return orElse();
/// }
/// ```
@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _SessionData value)? $default,{required TResult orElse(),}){
final _that = this;
switch (_that) {
case _SessionData() when $default != null:
return $default(_that);case _:
return orElse();
}
}
/// A `switch`-like method, using callbacks.
///
/// Callbacks receives the raw object, upcasted.
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case final Subclass2 value:
/// return ...;
/// }
/// ```
@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _SessionData value) $default,){
final _that = this;
switch (_that) {
case _SessionData():
return $default(_that);}
}
/// A variant of `map` that fallback to returning `null`.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case _:
/// return null;
/// }
/// ```
@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _SessionData value)? $default,){
final _that = this;
switch (_that) {
case _SessionData() when $default != null:
return $default(_that);case _:
return null;
}
}
/// A variant of `when` that fallback to an `orElse` callback.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case _:
/// return orElse();
/// }
/// ```
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( String sid, String csrfToken, String fullName, DateTime createdAt, List<AppInfo>? apps)? $default,{required TResult orElse(),}) {final _that = this;
switch (_that) {
case _SessionData() when $default != null:
return $default(_that.sid,_that.csrfToken,_that.fullName,_that.createdAt,_that.apps);case _:
return orElse();
}
}
/// A `switch`-like method, using callbacks.
///
/// As opposed to `map`, this offers destructuring.
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case Subclass2(:final field2):
/// return ...;
/// }
/// ```
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( String sid, String csrfToken, String fullName, DateTime createdAt, List<AppInfo>? apps) $default,) {final _that = this;
switch (_that) {
case _SessionData():
return $default(_that.sid,_that.csrfToken,_that.fullName,_that.createdAt,_that.apps);}
}
/// A variant of `when` that fallback to returning `null`
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case _:
/// return null;
/// }
/// ```
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( String sid, String csrfToken, String fullName, DateTime createdAt, List<AppInfo>? apps)? $default,) {final _that = this;
switch (_that) {
case _SessionData() when $default != null:
return $default(_that.sid,_that.csrfToken,_that.fullName,_that.createdAt,_that.apps);case _:
return null;
}
}
}
/// @nodoc
@JsonSerializable()
class _SessionData implements SessionData {
const _SessionData({required this.sid, required this.csrfToken, required this.fullName, required this.createdAt, final List<AppInfo>? apps}): _apps = apps;
factory _SessionData.fromJson(Map<String, dynamic> json) => _$SessionDataFromJson(json);
@override final String sid;
@override final String csrfToken;
@override final String fullName;
@override final DateTime createdAt;
final List<AppInfo>? _apps;
@override List<AppInfo>? get apps {
final value = _apps;
if (value == null) return null;
if (_apps is EqualUnmodifiableListView) return _apps;
// ignore: implicit_dynamic_type
return EqualUnmodifiableListView(value);
}
/// Create a copy of SessionData
/// with the given fields replaced by the non-null parameter values.
@override @JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
_$SessionDataCopyWith<_SessionData> get copyWith => __$SessionDataCopyWithImpl<_SessionData>(this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$SessionDataToJson(this, );
}
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is _SessionData&&(identical(other.sid, sid) || other.sid == sid)&&(identical(other.csrfToken, csrfToken) || other.csrfToken == csrfToken)&&(identical(other.fullName, fullName) || other.fullName == fullName)&&(identical(other.createdAt, createdAt) || other.createdAt == createdAt)&&const DeepCollectionEquality().equals(other._apps, _apps));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType,sid,csrfToken,fullName,createdAt,const DeepCollectionEquality().hash(_apps));
@override
String toString() {
return 'SessionData(sid: $sid, csrfToken: $csrfToken, fullName: $fullName, createdAt: $createdAt, apps: $apps)';
}
}
/// @nodoc
abstract mixin class _$SessionDataCopyWith<$Res> implements $SessionDataCopyWith<$Res> {
factory _$SessionDataCopyWith(_SessionData value, $Res Function(_SessionData) _then) = __$SessionDataCopyWithImpl;
@override @useResult
$Res call({
String sid, String csrfToken, String fullName, DateTime createdAt, List<AppInfo>? apps
});
}
/// @nodoc
class __$SessionDataCopyWithImpl<$Res>
implements _$SessionDataCopyWith<$Res> {
__$SessionDataCopyWithImpl(this._self, this._then);
final _SessionData _self;
final $Res Function(_SessionData) _then;
/// Create a copy of SessionData
/// with the given fields replaced by the non-null parameter values.
@override @pragma('vm:prefer-inline') $Res call({Object? sid = null,Object? csrfToken = null,Object? fullName = null,Object? createdAt = null,Object? apps = freezed,}) {
return _then(_SessionData(
sid: null == sid ? _self.sid : sid // ignore: cast_nullable_to_non_nullable
as String,csrfToken: null == csrfToken ? _self.csrfToken : csrfToken // ignore: cast_nullable_to_non_nullable
as String,fullName: null == fullName ? _self.fullName : fullName // ignore: cast_nullable_to_non_nullable
as String,createdAt: null == createdAt ? _self.createdAt : createdAt // ignore: cast_nullable_to_non_nullable
as DateTime,apps: freezed == apps ? _self._apps : apps // ignore: cast_nullable_to_non_nullable
as List<AppInfo>?,
));
}
}
// dart format on