user.freezed.dart 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414
  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. part of 'user.dart';
  6. // **************************************************************************
  7. // FreezedGenerator
  8. // **************************************************************************
  9. T _$identity<T>(T value) => value;
  10. final _privateConstructorUsedError = UnsupportedError(
  11. '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',
  12. );
  13. User _$UserFromJson(Map<String, dynamic> json) {
  14. return _User.fromJson(json);
  15. }
  16. /// @nodoc
  17. mixin _$User {
  18. String? get country => throw _privateConstructorUsedError;
  19. String? get userIp => throw _privateConstructorUsedError;
  20. String? get accessToken => throw _privateConstructorUsedError;
  21. String? get refreshToken => throw _privateConstructorUsedError;
  22. String? get accountKey => throw _privateConstructorUsedError;
  23. String? get accountPassword => throw _privateConstructorUsedError;
  24. String? get createTime => throw _privateConstructorUsedError;
  25. bool? get geographyEea => throw _privateConstructorUsedError;
  26. int? get memberLevel =>
  27. throw _privateConstructorUsedError; // 会员等级 1 游客 2 普通用户 3 会员
  28. String? get account => throw _privateConstructorUsedError; // 用户名
  29. bool? get activated => throw _privateConstructorUsedError;
  30. /// Serializes this User to a JSON map.
  31. Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
  32. /// Create a copy of User
  33. /// with the given fields replaced by the non-null parameter values.
  34. @JsonKey(includeFromJson: false, includeToJson: false)
  35. $UserCopyWith<User> get copyWith => throw _privateConstructorUsedError;
  36. }
  37. /// @nodoc
  38. abstract class $UserCopyWith<$Res> {
  39. factory $UserCopyWith(User value, $Res Function(User) then) =
  40. _$UserCopyWithImpl<$Res, User>;
  41. @useResult
  42. $Res call({
  43. String? country,
  44. String? userIp,
  45. String? accessToken,
  46. String? refreshToken,
  47. String? accountKey,
  48. String? accountPassword,
  49. String? createTime,
  50. bool? geographyEea,
  51. int? memberLevel,
  52. String? account,
  53. bool? activated,
  54. });
  55. }
  56. /// @nodoc
  57. class _$UserCopyWithImpl<$Res, $Val extends User>
  58. implements $UserCopyWith<$Res> {
  59. _$UserCopyWithImpl(this._value, this._then);
  60. // ignore: unused_field
  61. final $Val _value;
  62. // ignore: unused_field
  63. final $Res Function($Val) _then;
  64. /// Create a copy of User
  65. /// with the given fields replaced by the non-null parameter values.
  66. @pragma('vm:prefer-inline')
  67. @override
  68. $Res call({
  69. Object? country = freezed,
  70. Object? userIp = freezed,
  71. Object? accessToken = freezed,
  72. Object? refreshToken = freezed,
  73. Object? accountKey = freezed,
  74. Object? accountPassword = freezed,
  75. Object? createTime = freezed,
  76. Object? geographyEea = freezed,
  77. Object? memberLevel = freezed,
  78. Object? account = freezed,
  79. Object? activated = freezed,
  80. }) {
  81. return _then(
  82. _value.copyWith(
  83. country: freezed == country
  84. ? _value.country
  85. : country // ignore: cast_nullable_to_non_nullable
  86. as String?,
  87. userIp: freezed == userIp
  88. ? _value.userIp
  89. : userIp // ignore: cast_nullable_to_non_nullable
  90. as String?,
  91. accessToken: freezed == accessToken
  92. ? _value.accessToken
  93. : accessToken // ignore: cast_nullable_to_non_nullable
  94. as String?,
  95. refreshToken: freezed == refreshToken
  96. ? _value.refreshToken
  97. : refreshToken // ignore: cast_nullable_to_non_nullable
  98. as String?,
  99. accountKey: freezed == accountKey
  100. ? _value.accountKey
  101. : accountKey // ignore: cast_nullable_to_non_nullable
  102. as String?,
  103. accountPassword: freezed == accountPassword
  104. ? _value.accountPassword
  105. : accountPassword // ignore: cast_nullable_to_non_nullable
  106. as String?,
  107. createTime: freezed == createTime
  108. ? _value.createTime
  109. : createTime // ignore: cast_nullable_to_non_nullable
  110. as String?,
  111. geographyEea: freezed == geographyEea
  112. ? _value.geographyEea
  113. : geographyEea // ignore: cast_nullable_to_non_nullable
  114. as bool?,
  115. memberLevel: freezed == memberLevel
  116. ? _value.memberLevel
  117. : memberLevel // ignore: cast_nullable_to_non_nullable
  118. as int?,
  119. account: freezed == account
  120. ? _value.account
  121. : account // ignore: cast_nullable_to_non_nullable
  122. as String?,
  123. activated: freezed == activated
  124. ? _value.activated
  125. : activated // ignore: cast_nullable_to_non_nullable
  126. as bool?,
  127. )
  128. as $Val,
  129. );
  130. }
  131. }
  132. /// @nodoc
  133. abstract class _$$UserImplCopyWith<$Res> implements $UserCopyWith<$Res> {
  134. factory _$$UserImplCopyWith(
  135. _$UserImpl value,
  136. $Res Function(_$UserImpl) then,
  137. ) = __$$UserImplCopyWithImpl<$Res>;
  138. @override
  139. @useResult
  140. $Res call({
  141. String? country,
  142. String? userIp,
  143. String? accessToken,
  144. String? refreshToken,
  145. String? accountKey,
  146. String? accountPassword,
  147. String? createTime,
  148. bool? geographyEea,
  149. int? memberLevel,
  150. String? account,
  151. bool? activated,
  152. });
  153. }
  154. /// @nodoc
  155. class __$$UserImplCopyWithImpl<$Res>
  156. extends _$UserCopyWithImpl<$Res, _$UserImpl>
  157. implements _$$UserImplCopyWith<$Res> {
  158. __$$UserImplCopyWithImpl(_$UserImpl _value, $Res Function(_$UserImpl) _then)
  159. : super(_value, _then);
  160. /// Create a copy of User
  161. /// with the given fields replaced by the non-null parameter values.
  162. @pragma('vm:prefer-inline')
  163. @override
  164. $Res call({
  165. Object? country = freezed,
  166. Object? userIp = freezed,
  167. Object? accessToken = freezed,
  168. Object? refreshToken = freezed,
  169. Object? accountKey = freezed,
  170. Object? accountPassword = freezed,
  171. Object? createTime = freezed,
  172. Object? geographyEea = freezed,
  173. Object? memberLevel = freezed,
  174. Object? account = freezed,
  175. Object? activated = freezed,
  176. }) {
  177. return _then(
  178. _$UserImpl(
  179. country: freezed == country
  180. ? _value.country
  181. : country // ignore: cast_nullable_to_non_nullable
  182. as String?,
  183. userIp: freezed == userIp
  184. ? _value.userIp
  185. : userIp // ignore: cast_nullable_to_non_nullable
  186. as String?,
  187. accessToken: freezed == accessToken
  188. ? _value.accessToken
  189. : accessToken // ignore: cast_nullable_to_non_nullable
  190. as String?,
  191. refreshToken: freezed == refreshToken
  192. ? _value.refreshToken
  193. : refreshToken // ignore: cast_nullable_to_non_nullable
  194. as String?,
  195. accountKey: freezed == accountKey
  196. ? _value.accountKey
  197. : accountKey // ignore: cast_nullable_to_non_nullable
  198. as String?,
  199. accountPassword: freezed == accountPassword
  200. ? _value.accountPassword
  201. : accountPassword // ignore: cast_nullable_to_non_nullable
  202. as String?,
  203. createTime: freezed == createTime
  204. ? _value.createTime
  205. : createTime // ignore: cast_nullable_to_non_nullable
  206. as String?,
  207. geographyEea: freezed == geographyEea
  208. ? _value.geographyEea
  209. : geographyEea // ignore: cast_nullable_to_non_nullable
  210. as bool?,
  211. memberLevel: freezed == memberLevel
  212. ? _value.memberLevel
  213. : memberLevel // ignore: cast_nullable_to_non_nullable
  214. as int?,
  215. account: freezed == account
  216. ? _value.account
  217. : account // ignore: cast_nullable_to_non_nullable
  218. as String?,
  219. activated: freezed == activated
  220. ? _value.activated
  221. : activated // ignore: cast_nullable_to_non_nullable
  222. as bool?,
  223. ),
  224. );
  225. }
  226. }
  227. /// @nodoc
  228. @JsonSerializable()
  229. class _$UserImpl with DiagnosticableTreeMixin implements _User {
  230. const _$UserImpl({
  231. this.country,
  232. this.userIp,
  233. this.accessToken,
  234. this.refreshToken,
  235. this.accountKey,
  236. this.accountPassword,
  237. this.createTime,
  238. this.geographyEea,
  239. this.memberLevel,
  240. this.account,
  241. this.activated,
  242. });
  243. factory _$UserImpl.fromJson(Map<String, dynamic> json) =>
  244. _$$UserImplFromJson(json);
  245. @override
  246. final String? country;
  247. @override
  248. final String? userIp;
  249. @override
  250. final String? accessToken;
  251. @override
  252. final String? refreshToken;
  253. @override
  254. final String? accountKey;
  255. @override
  256. final String? accountPassword;
  257. @override
  258. final String? createTime;
  259. @override
  260. final bool? geographyEea;
  261. @override
  262. final int? memberLevel;
  263. // 会员等级 1 游客 2 普通用户 3 会员
  264. @override
  265. final String? account;
  266. // 用户名
  267. @override
  268. final bool? activated;
  269. @override
  270. String toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) {
  271. return 'User(country: $country, userIp: $userIp, accessToken: $accessToken, refreshToken: $refreshToken, accountKey: $accountKey, accountPassword: $accountPassword, createTime: $createTime, geographyEea: $geographyEea, memberLevel: $memberLevel, account: $account, activated: $activated)';
  272. }
  273. @override
  274. void debugFillProperties(DiagnosticPropertiesBuilder properties) {
  275. super.debugFillProperties(properties);
  276. properties
  277. ..add(DiagnosticsProperty('type', 'User'))
  278. ..add(DiagnosticsProperty('country', country))
  279. ..add(DiagnosticsProperty('userIp', userIp))
  280. ..add(DiagnosticsProperty('accessToken', accessToken))
  281. ..add(DiagnosticsProperty('refreshToken', refreshToken))
  282. ..add(DiagnosticsProperty('accountKey', accountKey))
  283. ..add(DiagnosticsProperty('accountPassword', accountPassword))
  284. ..add(DiagnosticsProperty('createTime', createTime))
  285. ..add(DiagnosticsProperty('geographyEea', geographyEea))
  286. ..add(DiagnosticsProperty('memberLevel', memberLevel))
  287. ..add(DiagnosticsProperty('account', account))
  288. ..add(DiagnosticsProperty('activated', activated));
  289. }
  290. @override
  291. bool operator ==(Object other) {
  292. return identical(this, other) ||
  293. (other.runtimeType == runtimeType &&
  294. other is _$UserImpl &&
  295. (identical(other.country, country) || other.country == country) &&
  296. (identical(other.userIp, userIp) || other.userIp == userIp) &&
  297. (identical(other.accessToken, accessToken) ||
  298. other.accessToken == accessToken) &&
  299. (identical(other.refreshToken, refreshToken) ||
  300. other.refreshToken == refreshToken) &&
  301. (identical(other.accountKey, accountKey) ||
  302. other.accountKey == accountKey) &&
  303. (identical(other.accountPassword, accountPassword) ||
  304. other.accountPassword == accountPassword) &&
  305. (identical(other.createTime, createTime) ||
  306. other.createTime == createTime) &&
  307. (identical(other.geographyEea, geographyEea) ||
  308. other.geographyEea == geographyEea) &&
  309. (identical(other.memberLevel, memberLevel) ||
  310. other.memberLevel == memberLevel) &&
  311. (identical(other.account, account) || other.account == account) &&
  312. (identical(other.activated, activated) ||
  313. other.activated == activated));
  314. }
  315. @JsonKey(includeFromJson: false, includeToJson: false)
  316. @override
  317. int get hashCode => Object.hash(
  318. runtimeType,
  319. country,
  320. userIp,
  321. accessToken,
  322. refreshToken,
  323. accountKey,
  324. accountPassword,
  325. createTime,
  326. geographyEea,
  327. memberLevel,
  328. account,
  329. activated,
  330. );
  331. /// Create a copy of User
  332. /// with the given fields replaced by the non-null parameter values.
  333. @JsonKey(includeFromJson: false, includeToJson: false)
  334. @override
  335. @pragma('vm:prefer-inline')
  336. _$$UserImplCopyWith<_$UserImpl> get copyWith =>
  337. __$$UserImplCopyWithImpl<_$UserImpl>(this, _$identity);
  338. @override
  339. Map<String, dynamic> toJson() {
  340. return _$$UserImplToJson(this);
  341. }
  342. }
  343. abstract class _User implements User {
  344. const factory _User({
  345. final String? country,
  346. final String? userIp,
  347. final String? accessToken,
  348. final String? refreshToken,
  349. final String? accountKey,
  350. final String? accountPassword,
  351. final String? createTime,
  352. final bool? geographyEea,
  353. final int? memberLevel,
  354. final String? account,
  355. final bool? activated,
  356. }) = _$UserImpl;
  357. factory _User.fromJson(Map<String, dynamic> json) = _$UserImpl.fromJson;
  358. @override
  359. String? get country;
  360. @override
  361. String? get userIp;
  362. @override
  363. String? get accessToken;
  364. @override
  365. String? get refreshToken;
  366. @override
  367. String? get accountKey;
  368. @override
  369. String? get accountPassword;
  370. @override
  371. String? get createTime;
  372. @override
  373. bool? get geographyEea;
  374. @override
  375. int? get memberLevel; // 会员等级 1 游客 2 普通用户 3 会员
  376. @override
  377. String? get account; // 用户名
  378. @override
  379. bool? get activated;
  380. /// Create a copy of User
  381. /// with the given fields replaced by the non-null parameter values.
  382. @override
  383. @JsonKey(includeFromJson: false, includeToJson: false)
  384. _$$UserImplCopyWith<_$UserImpl> get copyWith =>
  385. throw _privateConstructorUsedError;
  386. }