this repo has no description
at main 237 lines 7.4 kB view raw
1// coverage:ignore-file 2// GENERATED CODE - DO NOT MODIFY BY HAND 3// ignore_for_file: type=lint 4// 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 5 6part of 'session.dart'; 7 8// ************************************************************************** 9// FreezedGenerator 10// ************************************************************************** 11 12T _$identity<T>(T value) => value; 13 14final _privateConstructorUsedError = UnsupportedError( 15 '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', 16); 17 18Session _$SessionFromJson(Map<String, dynamic> json) { 19 return _Session.fromJson(json); 20} 21 22/// @nodoc 23mixin _$Session { 24 String get token => throw _privateConstructorUsedError; 25 String get refreshToken => throw _privateConstructorUsedError; 26 DateTime get expiresAt => throw _privateConstructorUsedError; 27 String get did => throw _privateConstructorUsedError; 28 29 /// Serializes this Session to a JSON map. 30 Map<String, dynamic> toJson() => throw _privateConstructorUsedError; 31 32 /// Create a copy of Session 33 /// with the given fields replaced by the non-null parameter values. 34 @JsonKey(includeFromJson: false, includeToJson: false) 35 $SessionCopyWith<Session> get copyWith => throw _privateConstructorUsedError; 36} 37 38/// @nodoc 39abstract class $SessionCopyWith<$Res> { 40 factory $SessionCopyWith(Session value, $Res Function(Session) then) = 41 _$SessionCopyWithImpl<$Res, Session>; 42 @useResult 43 $Res call({ 44 String token, 45 String refreshToken, 46 DateTime expiresAt, 47 String did, 48 }); 49} 50 51/// @nodoc 52class _$SessionCopyWithImpl<$Res, $Val extends Session> 53 implements $SessionCopyWith<$Res> { 54 _$SessionCopyWithImpl(this._value, this._then); 55 56 // ignore: unused_field 57 final $Val _value; 58 // ignore: unused_field 59 final $Res Function($Val) _then; 60 61 /// Create a copy of Session 62 /// with the given fields replaced by the non-null parameter values. 63 @pragma('vm:prefer-inline') 64 @override 65 $Res call({ 66 Object? token = null, 67 Object? refreshToken = null, 68 Object? expiresAt = null, 69 Object? did = null, 70 }) { 71 return _then( 72 _value.copyWith( 73 token: null == token 74 ? _value.token 75 : token // ignore: cast_nullable_to_non_nullable 76 as String, 77 refreshToken: null == refreshToken 78 ? _value.refreshToken 79 : refreshToken // ignore: cast_nullable_to_non_nullable 80 as String, 81 expiresAt: null == expiresAt 82 ? _value.expiresAt 83 : expiresAt // ignore: cast_nullable_to_non_nullable 84 as DateTime, 85 did: null == did 86 ? _value.did 87 : did // ignore: cast_nullable_to_non_nullable 88 as String, 89 ) 90 as $Val, 91 ); 92 } 93} 94 95/// @nodoc 96abstract class _$$SessionImplCopyWith<$Res> implements $SessionCopyWith<$Res> { 97 factory _$$SessionImplCopyWith( 98 _$SessionImpl value, 99 $Res Function(_$SessionImpl) then, 100 ) = __$$SessionImplCopyWithImpl<$Res>; 101 @override 102 @useResult 103 $Res call({ 104 String token, 105 String refreshToken, 106 DateTime expiresAt, 107 String did, 108 }); 109} 110 111/// @nodoc 112class __$$SessionImplCopyWithImpl<$Res> 113 extends _$SessionCopyWithImpl<$Res, _$SessionImpl> 114 implements _$$SessionImplCopyWith<$Res> { 115 __$$SessionImplCopyWithImpl( 116 _$SessionImpl _value, 117 $Res Function(_$SessionImpl) _then, 118 ) : super(_value, _then); 119 120 /// Create a copy of Session 121 /// with the given fields replaced by the non-null parameter values. 122 @pragma('vm:prefer-inline') 123 @override 124 $Res call({ 125 Object? token = null, 126 Object? refreshToken = null, 127 Object? expiresAt = null, 128 Object? did = null, 129 }) { 130 return _then( 131 _$SessionImpl( 132 token: null == token 133 ? _value.token 134 : token // ignore: cast_nullable_to_non_nullable 135 as String, 136 refreshToken: null == refreshToken 137 ? _value.refreshToken 138 : refreshToken // ignore: cast_nullable_to_non_nullable 139 as String, 140 expiresAt: null == expiresAt 141 ? _value.expiresAt 142 : expiresAt // ignore: cast_nullable_to_non_nullable 143 as DateTime, 144 did: null == did 145 ? _value.did 146 : did // ignore: cast_nullable_to_non_nullable 147 as String, 148 ), 149 ); 150 } 151} 152 153/// @nodoc 154@JsonSerializable() 155class _$SessionImpl implements _Session { 156 const _$SessionImpl({ 157 required this.token, 158 required this.refreshToken, 159 required this.expiresAt, 160 required this.did, 161 }); 162 163 factory _$SessionImpl.fromJson(Map<String, dynamic> json) => 164 _$$SessionImplFromJson(json); 165 166 @override 167 final String token; 168 @override 169 final String refreshToken; 170 @override 171 final DateTime expiresAt; 172 @override 173 final String did; 174 175 @override 176 String toString() { 177 return 'Session(token: $token, refreshToken: $refreshToken, expiresAt: $expiresAt, did: $did)'; 178 } 179 180 @override 181 bool operator ==(Object other) { 182 return identical(this, other) || 183 (other.runtimeType == runtimeType && 184 other is _$SessionImpl && 185 (identical(other.token, token) || other.token == token) && 186 (identical(other.refreshToken, refreshToken) || 187 other.refreshToken == refreshToken) && 188 (identical(other.expiresAt, expiresAt) || 189 other.expiresAt == expiresAt) && 190 (identical(other.did, did) || other.did == did)); 191 } 192 193 @JsonKey(includeFromJson: false, includeToJson: false) 194 @override 195 int get hashCode => 196 Object.hash(runtimeType, token, refreshToken, expiresAt, did); 197 198 /// Create a copy of Session 199 /// with the given fields replaced by the non-null parameter values. 200 @JsonKey(includeFromJson: false, includeToJson: false) 201 @override 202 @pragma('vm:prefer-inline') 203 _$$SessionImplCopyWith<_$SessionImpl> get copyWith => 204 __$$SessionImplCopyWithImpl<_$SessionImpl>(this, _$identity); 205 206 @override 207 Map<String, dynamic> toJson() { 208 return _$$SessionImplToJson(this); 209 } 210} 211 212abstract class _Session implements Session { 213 const factory _Session({ 214 required final String token, 215 required final String refreshToken, 216 required final DateTime expiresAt, 217 required final String did, 218 }) = _$SessionImpl; 219 220 factory _Session.fromJson(Map<String, dynamic> json) = _$SessionImpl.fromJson; 221 222 @override 223 String get token; 224 @override 225 String get refreshToken; 226 @override 227 DateTime get expiresAt; 228 @override 229 String get did; 230 231 /// Create a copy of Session 232 /// with the given fields replaced by the non-null parameter values. 233 @override 234 @JsonKey(includeFromJson: false, includeToJson: false) 235 _$$SessionImplCopyWith<_$SessionImpl> get copyWith => 236 throw _privateConstructorUsedError; 237}