You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

798 lines
23 KiB

2 years ago
  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
  5. part of 'player_matching_state.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 informations: https://github.com/rrousselGit/freezed#custom-getters-and-methods');
  12. /// @nodoc
  13. class _$PlayerMatchingStateTearOff {
  14. const _$PlayerMatchingStateTearOff();
  15. PlayerMatchingIdle call() {
  16. return const PlayerMatchingIdle();
  17. }
  18. PlayerMatchingProcessing processing() {
  19. return const PlayerMatchingProcessing();
  20. }
  21. PlayerMatched isMatched(String id) {
  22. return PlayerMatched(
  23. id,
  24. );
  25. }
  26. PlayerQueue isQueued() {
  27. return const PlayerQueue();
  28. }
  29. PlayerMatchingError error({String? message}) {
  30. return PlayerMatchingError(
  31. message: message,
  32. );
  33. }
  34. }
  35. /// @nodoc
  36. const $PlayerMatchingState = _$PlayerMatchingStateTearOff();
  37. /// @nodoc
  38. mixin _$PlayerMatchingState {
  39. @optionalTypeArgs
  40. TResult when<TResult extends Object?>(
  41. TResult Function() $default, {
  42. required TResult Function() processing,
  43. required TResult Function(String id) isMatched,
  44. required TResult Function() isQueued,
  45. required TResult Function(String? message) error,
  46. }) =>
  47. throw _privateConstructorUsedError;
  48. @optionalTypeArgs
  49. TResult? whenOrNull<TResult extends Object?>(
  50. TResult Function()? $default, {
  51. TResult Function()? processing,
  52. TResult Function(String id)? isMatched,
  53. TResult Function()? isQueued,
  54. TResult Function(String? message)? error,
  55. }) =>
  56. throw _privateConstructorUsedError;
  57. @optionalTypeArgs
  58. TResult maybeWhen<TResult extends Object?>(
  59. TResult Function()? $default, {
  60. TResult Function()? processing,
  61. TResult Function(String id)? isMatched,
  62. TResult Function()? isQueued,
  63. TResult Function(String? message)? error,
  64. required TResult orElse(),
  65. }) =>
  66. throw _privateConstructorUsedError;
  67. @optionalTypeArgs
  68. TResult map<TResult extends Object?>(
  69. TResult Function(PlayerMatchingIdle value) $default, {
  70. required TResult Function(PlayerMatchingProcessing value) processing,
  71. required TResult Function(PlayerMatched value) isMatched,
  72. required TResult Function(PlayerQueue value) isQueued,
  73. required TResult Function(PlayerMatchingError value) error,
  74. }) =>
  75. throw _privateConstructorUsedError;
  76. @optionalTypeArgs
  77. TResult? mapOrNull<TResult extends Object?>(
  78. TResult Function(PlayerMatchingIdle value)? $default, {
  79. TResult Function(PlayerMatchingProcessing value)? processing,
  80. TResult Function(PlayerMatched value)? isMatched,
  81. TResult Function(PlayerQueue value)? isQueued,
  82. TResult Function(PlayerMatchingError value)? error,
  83. }) =>
  84. throw _privateConstructorUsedError;
  85. @optionalTypeArgs
  86. TResult maybeMap<TResult extends Object?>(
  87. TResult Function(PlayerMatchingIdle value)? $default, {
  88. TResult Function(PlayerMatchingProcessing value)? processing,
  89. TResult Function(PlayerMatched value)? isMatched,
  90. TResult Function(PlayerQueue value)? isQueued,
  91. TResult Function(PlayerMatchingError value)? error,
  92. required TResult orElse(),
  93. }) =>
  94. throw _privateConstructorUsedError;
  95. }
  96. /// @nodoc
  97. abstract class $PlayerMatchingStateCopyWith<$Res> {
  98. factory $PlayerMatchingStateCopyWith(
  99. PlayerMatchingState value, $Res Function(PlayerMatchingState) then) =
  100. _$PlayerMatchingStateCopyWithImpl<$Res>;
  101. }
  102. /// @nodoc
  103. class _$PlayerMatchingStateCopyWithImpl<$Res>
  104. implements $PlayerMatchingStateCopyWith<$Res> {
  105. _$PlayerMatchingStateCopyWithImpl(this._value, this._then);
  106. final PlayerMatchingState _value;
  107. // ignore: unused_field
  108. final $Res Function(PlayerMatchingState) _then;
  109. }
  110. /// @nodoc
  111. abstract class $PlayerMatchingIdleCopyWith<$Res> {
  112. factory $PlayerMatchingIdleCopyWith(
  113. PlayerMatchingIdle value, $Res Function(PlayerMatchingIdle) then) =
  114. _$PlayerMatchingIdleCopyWithImpl<$Res>;
  115. }
  116. /// @nodoc
  117. class _$PlayerMatchingIdleCopyWithImpl<$Res>
  118. extends _$PlayerMatchingStateCopyWithImpl<$Res>
  119. implements $PlayerMatchingIdleCopyWith<$Res> {
  120. _$PlayerMatchingIdleCopyWithImpl(
  121. PlayerMatchingIdle _value, $Res Function(PlayerMatchingIdle) _then)
  122. : super(_value, (v) => _then(v as PlayerMatchingIdle));
  123. @override
  124. PlayerMatchingIdle get _value => super._value as PlayerMatchingIdle;
  125. }
  126. /// @nodoc
  127. class _$PlayerMatchingIdle implements PlayerMatchingIdle {
  128. const _$PlayerMatchingIdle();
  129. @override
  130. String toString() {
  131. return 'PlayerMatchingState()';
  132. }
  133. @override
  134. bool operator ==(dynamic other) {
  135. return identical(this, other) ||
  136. (other.runtimeType == runtimeType && other is PlayerMatchingIdle);
  137. }
  138. @override
  139. int get hashCode => runtimeType.hashCode;
  140. @override
  141. @optionalTypeArgs
  142. TResult when<TResult extends Object?>(
  143. TResult Function() $default, {
  144. required TResult Function() processing,
  145. required TResult Function(String id) isMatched,
  146. required TResult Function() isQueued,
  147. required TResult Function(String? message) error,
  148. }) {
  149. return $default();
  150. }
  151. @override
  152. @optionalTypeArgs
  153. TResult? whenOrNull<TResult extends Object?>(
  154. TResult Function()? $default, {
  155. TResult Function()? processing,
  156. TResult Function(String id)? isMatched,
  157. TResult Function()? isQueued,
  158. TResult Function(String? message)? error,
  159. }) {
  160. return $default?.call();
  161. }
  162. @override
  163. @optionalTypeArgs
  164. TResult maybeWhen<TResult extends Object?>(
  165. TResult Function()? $default, {
  166. TResult Function()? processing,
  167. TResult Function(String id)? isMatched,
  168. TResult Function()? isQueued,
  169. TResult Function(String? message)? error,
  170. required TResult orElse(),
  171. }) {
  172. if ($default != null) {
  173. return $default();
  174. }
  175. return orElse();
  176. }
  177. @override
  178. @optionalTypeArgs
  179. TResult map<TResult extends Object?>(
  180. TResult Function(PlayerMatchingIdle value) $default, {
  181. required TResult Function(PlayerMatchingProcessing value) processing,
  182. required TResult Function(PlayerMatched value) isMatched,
  183. required TResult Function(PlayerQueue value) isQueued,
  184. required TResult Function(PlayerMatchingError value) error,
  185. }) {
  186. return $default(this);
  187. }
  188. @override
  189. @optionalTypeArgs
  190. TResult? mapOrNull<TResult extends Object?>(
  191. TResult Function(PlayerMatchingIdle value)? $default, {
  192. TResult Function(PlayerMatchingProcessing value)? processing,
  193. TResult Function(PlayerMatched value)? isMatched,
  194. TResult Function(PlayerQueue value)? isQueued,
  195. TResult Function(PlayerMatchingError value)? error,
  196. }) {
  197. return $default?.call(this);
  198. }
  199. @override
  200. @optionalTypeArgs
  201. TResult maybeMap<TResult extends Object?>(
  202. TResult Function(PlayerMatchingIdle value)? $default, {
  203. TResult Function(PlayerMatchingProcessing value)? processing,
  204. TResult Function(PlayerMatched value)? isMatched,
  205. TResult Function(PlayerQueue value)? isQueued,
  206. TResult Function(PlayerMatchingError value)? error,
  207. required TResult orElse(),
  208. }) {
  209. if ($default != null) {
  210. return $default(this);
  211. }
  212. return orElse();
  213. }
  214. }
  215. abstract class PlayerMatchingIdle implements PlayerMatchingState {
  216. const factory PlayerMatchingIdle() = _$PlayerMatchingIdle;
  217. }
  218. /// @nodoc
  219. abstract class $PlayerMatchingProcessingCopyWith<$Res> {
  220. factory $PlayerMatchingProcessingCopyWith(PlayerMatchingProcessing value,
  221. $Res Function(PlayerMatchingProcessing) then) =
  222. _$PlayerMatchingProcessingCopyWithImpl<$Res>;
  223. }
  224. /// @nodoc
  225. class _$PlayerMatchingProcessingCopyWithImpl<$Res>
  226. extends _$PlayerMatchingStateCopyWithImpl<$Res>
  227. implements $PlayerMatchingProcessingCopyWith<$Res> {
  228. _$PlayerMatchingProcessingCopyWithImpl(PlayerMatchingProcessing _value,
  229. $Res Function(PlayerMatchingProcessing) _then)
  230. : super(_value, (v) => _then(v as PlayerMatchingProcessing));
  231. @override
  232. PlayerMatchingProcessing get _value =>
  233. super._value as PlayerMatchingProcessing;
  234. }
  235. /// @nodoc
  236. class _$PlayerMatchingProcessing implements PlayerMatchingProcessing {
  237. const _$PlayerMatchingProcessing();
  238. @override
  239. String toString() {
  240. return 'PlayerMatchingState.processing()';
  241. }
  242. @override
  243. bool operator ==(dynamic other) {
  244. return identical(this, other) ||
  245. (other.runtimeType == runtimeType && other is PlayerMatchingProcessing);
  246. }
  247. @override
  248. int get hashCode => runtimeType.hashCode;
  249. @override
  250. @optionalTypeArgs
  251. TResult when<TResult extends Object?>(
  252. TResult Function() $default, {
  253. required TResult Function() processing,
  254. required TResult Function(String id) isMatched,
  255. required TResult Function() isQueued,
  256. required TResult Function(String? message) error,
  257. }) {
  258. return processing();
  259. }
  260. @override
  261. @optionalTypeArgs
  262. TResult? whenOrNull<TResult extends Object?>(
  263. TResult Function()? $default, {
  264. TResult Function()? processing,
  265. TResult Function(String id)? isMatched,
  266. TResult Function()? isQueued,
  267. TResult Function(String? message)? error,
  268. }) {
  269. return processing?.call();
  270. }
  271. @override
  272. @optionalTypeArgs
  273. TResult maybeWhen<TResult extends Object?>(
  274. TResult Function()? $default, {
  275. TResult Function()? processing,
  276. TResult Function(String id)? isMatched,
  277. TResult Function()? isQueued,
  278. TResult Function(String? message)? error,
  279. required TResult orElse(),
  280. }) {
  281. if (processing != null) {
  282. return processing();
  283. }
  284. return orElse();
  285. }
  286. @override
  287. @optionalTypeArgs
  288. TResult map<TResult extends Object?>(
  289. TResult Function(PlayerMatchingIdle value) $default, {
  290. required TResult Function(PlayerMatchingProcessing value) processing,
  291. required TResult Function(PlayerMatched value) isMatched,
  292. required TResult Function(PlayerQueue value) isQueued,
  293. required TResult Function(PlayerMatchingError value) error,
  294. }) {
  295. return processing(this);
  296. }
  297. @override
  298. @optionalTypeArgs
  299. TResult? mapOrNull<TResult extends Object?>(
  300. TResult Function(PlayerMatchingIdle value)? $default, {
  301. TResult Function(PlayerMatchingProcessing value)? processing,
  302. TResult Function(PlayerMatched value)? isMatched,
  303. TResult Function(PlayerQueue value)? isQueued,
  304. TResult Function(PlayerMatchingError value)? error,
  305. }) {
  306. return processing?.call(this);
  307. }
  308. @override
  309. @optionalTypeArgs
  310. TResult maybeMap<TResult extends Object?>(
  311. TResult Function(PlayerMatchingIdle value)? $default, {
  312. TResult Function(PlayerMatchingProcessing value)? processing,
  313. TResult Function(PlayerMatched value)? isMatched,
  314. TResult Function(PlayerQueue value)? isQueued,
  315. TResult Function(PlayerMatchingError value)? error,
  316. required TResult orElse(),
  317. }) {
  318. if (processing != null) {
  319. return processing(this);
  320. }
  321. return orElse();
  322. }
  323. }
  324. abstract class PlayerMatchingProcessing implements PlayerMatchingState {
  325. const factory PlayerMatchingProcessing() = _$PlayerMatchingProcessing;
  326. }
  327. /// @nodoc
  328. abstract class $PlayerMatchedCopyWith<$Res> {
  329. factory $PlayerMatchedCopyWith(
  330. PlayerMatched value, $Res Function(PlayerMatched) then) =
  331. _$PlayerMatchedCopyWithImpl<$Res>;
  332. $Res call({String id});
  333. }
  334. /// @nodoc
  335. class _$PlayerMatchedCopyWithImpl<$Res>
  336. extends _$PlayerMatchingStateCopyWithImpl<$Res>
  337. implements $PlayerMatchedCopyWith<$Res> {
  338. _$PlayerMatchedCopyWithImpl(
  339. PlayerMatched _value, $Res Function(PlayerMatched) _then)
  340. : super(_value, (v) => _then(v as PlayerMatched));
  341. @override
  342. PlayerMatched get _value => super._value as PlayerMatched;
  343. @override
  344. $Res call({
  345. Object? id = freezed,
  346. }) {
  347. return _then(PlayerMatched(
  348. id == freezed
  349. ? _value.id
  350. : id // ignore: cast_nullable_to_non_nullable
  351. as String,
  352. ));
  353. }
  354. }
  355. /// @nodoc
  356. class _$PlayerMatched implements PlayerMatched {
  357. const _$PlayerMatched(this.id);
  358. @override
  359. final String id;
  360. @override
  361. String toString() {
  362. return 'PlayerMatchingState.isMatched(id: $id)';
  363. }
  364. @override
  365. bool operator ==(dynamic other) {
  366. return identical(this, other) ||
  367. (other.runtimeType == runtimeType &&
  368. other is PlayerMatched &&
  369. const DeepCollectionEquality().equals(other.id, id));
  370. }
  371. @override
  372. int get hashCode =>
  373. Object.hash(runtimeType, const DeepCollectionEquality().hash(id));
  374. @JsonKey(ignore: true)
  375. @override
  376. $PlayerMatchedCopyWith<PlayerMatched> get copyWith =>
  377. _$PlayerMatchedCopyWithImpl<PlayerMatched>(this, _$identity);
  378. @override
  379. @optionalTypeArgs
  380. TResult when<TResult extends Object?>(
  381. TResult Function() $default, {
  382. required TResult Function() processing,
  383. required TResult Function(String id) isMatched,
  384. required TResult Function() isQueued,
  385. required TResult Function(String? message) error,
  386. }) {
  387. return isMatched(id);
  388. }
  389. @override
  390. @optionalTypeArgs
  391. TResult? whenOrNull<TResult extends Object?>(
  392. TResult Function()? $default, {
  393. TResult Function()? processing,
  394. TResult Function(String id)? isMatched,
  395. TResult Function()? isQueued,
  396. TResult Function(String? message)? error,
  397. }) {
  398. return isMatched?.call(id);
  399. }
  400. @override
  401. @optionalTypeArgs
  402. TResult maybeWhen<TResult extends Object?>(
  403. TResult Function()? $default, {
  404. TResult Function()? processing,
  405. TResult Function(String id)? isMatched,
  406. TResult Function()? isQueued,
  407. TResult Function(String? message)? error,
  408. required TResult orElse(),
  409. }) {
  410. if (isMatched != null) {
  411. return isMatched(id);
  412. }
  413. return orElse();
  414. }
  415. @override
  416. @optionalTypeArgs
  417. TResult map<TResult extends Object?>(
  418. TResult Function(PlayerMatchingIdle value) $default, {
  419. required TResult Function(PlayerMatchingProcessing value) processing,
  420. required TResult Function(PlayerMatched value) isMatched,
  421. required TResult Function(PlayerQueue value) isQueued,
  422. required TResult Function(PlayerMatchingError value) error,
  423. }) {
  424. return isMatched(this);
  425. }
  426. @override
  427. @optionalTypeArgs
  428. TResult? mapOrNull<TResult extends Object?>(
  429. TResult Function(PlayerMatchingIdle value)? $default, {
  430. TResult Function(PlayerMatchingProcessing value)? processing,
  431. TResult Function(PlayerMatched value)? isMatched,
  432. TResult Function(PlayerQueue value)? isQueued,
  433. TResult Function(PlayerMatchingError value)? error,
  434. }) {
  435. return isMatched?.call(this);
  436. }
  437. @override
  438. @optionalTypeArgs
  439. TResult maybeMap<TResult extends Object?>(
  440. TResult Function(PlayerMatchingIdle value)? $default, {
  441. TResult Function(PlayerMatchingProcessing value)? processing,
  442. TResult Function(PlayerMatched value)? isMatched,
  443. TResult Function(PlayerQueue value)? isQueued,
  444. TResult Function(PlayerMatchingError value)? error,
  445. required TResult orElse(),
  446. }) {
  447. if (isMatched != null) {
  448. return isMatched(this);
  449. }
  450. return orElse();
  451. }
  452. }
  453. abstract class PlayerMatched implements PlayerMatchingState {
  454. const factory PlayerMatched(String id) = _$PlayerMatched;
  455. String get id;
  456. @JsonKey(ignore: true)
  457. $PlayerMatchedCopyWith<PlayerMatched> get copyWith =>
  458. throw _privateConstructorUsedError;
  459. }
  460. /// @nodoc
  461. abstract class $PlayerQueueCopyWith<$Res> {
  462. factory $PlayerQueueCopyWith(
  463. PlayerQueue value, $Res Function(PlayerQueue) then) =
  464. _$PlayerQueueCopyWithImpl<$Res>;
  465. }
  466. /// @nodoc
  467. class _$PlayerQueueCopyWithImpl<$Res>
  468. extends _$PlayerMatchingStateCopyWithImpl<$Res>
  469. implements $PlayerQueueCopyWith<$Res> {
  470. _$PlayerQueueCopyWithImpl(
  471. PlayerQueue _value, $Res Function(PlayerQueue) _then)
  472. : super(_value, (v) => _then(v as PlayerQueue));
  473. @override
  474. PlayerQueue get _value => super._value as PlayerQueue;
  475. }
  476. /// @nodoc
  477. class _$PlayerQueue implements PlayerQueue {
  478. const _$PlayerQueue();
  479. @override
  480. String toString() {
  481. return 'PlayerMatchingState.isQueued()';
  482. }
  483. @override
  484. bool operator ==(dynamic other) {
  485. return identical(this, other) ||
  486. (other.runtimeType == runtimeType && other is PlayerQueue);
  487. }
  488. @override
  489. int get hashCode => runtimeType.hashCode;
  490. @override
  491. @optionalTypeArgs
  492. TResult when<TResult extends Object?>(
  493. TResult Function() $default, {
  494. required TResult Function() processing,
  495. required TResult Function(String id) isMatched,
  496. required TResult Function() isQueued,
  497. required TResult Function(String? message) error,
  498. }) {
  499. return isQueued();
  500. }
  501. @override
  502. @optionalTypeArgs
  503. TResult? whenOrNull<TResult extends Object?>(
  504. TResult Function()? $default, {
  505. TResult Function()? processing,
  506. TResult Function(String id)? isMatched,
  507. TResult Function()? isQueued,
  508. TResult Function(String? message)? error,
  509. }) {
  510. return isQueued?.call();
  511. }
  512. @override
  513. @optionalTypeArgs
  514. TResult maybeWhen<TResult extends Object?>(
  515. TResult Function()? $default, {
  516. TResult Function()? processing,
  517. TResult Function(String id)? isMatched,
  518. TResult Function()? isQueued,
  519. TResult Function(String? message)? error,
  520. required TResult orElse(),
  521. }) {
  522. if (isQueued != null) {
  523. return isQueued();
  524. }
  525. return orElse();
  526. }
  527. @override
  528. @optionalTypeArgs
  529. TResult map<TResult extends Object?>(
  530. TResult Function(PlayerMatchingIdle value) $default, {
  531. required TResult Function(PlayerMatchingProcessing value) processing,
  532. required TResult Function(PlayerMatched value) isMatched,
  533. required TResult Function(PlayerQueue value) isQueued,
  534. required TResult Function(PlayerMatchingError value) error,
  535. }) {
  536. return isQueued(this);
  537. }
  538. @override
  539. @optionalTypeArgs
  540. TResult? mapOrNull<TResult extends Object?>(
  541. TResult Function(PlayerMatchingIdle value)? $default, {
  542. TResult Function(PlayerMatchingProcessing value)? processing,
  543. TResult Function(PlayerMatched value)? isMatched,
  544. TResult Function(PlayerQueue value)? isQueued,
  545. TResult Function(PlayerMatchingError value)? error,
  546. }) {
  547. return isQueued?.call(this);
  548. }
  549. @override
  550. @optionalTypeArgs
  551. TResult maybeMap<TResult extends Object?>(
  552. TResult Function(PlayerMatchingIdle value)? $default, {
  553. TResult Function(PlayerMatchingProcessing value)? processing,
  554. TResult Function(PlayerMatched value)? isMatched,
  555. TResult Function(PlayerQueue value)? isQueued,
  556. TResult Function(PlayerMatchingError value)? error,
  557. required TResult orElse(),
  558. }) {
  559. if (isQueued != null) {
  560. return isQueued(this);
  561. }
  562. return orElse();
  563. }
  564. }
  565. abstract class PlayerQueue implements PlayerMatchingState {
  566. const factory PlayerQueue() = _$PlayerQueue;
  567. }
  568. /// @nodoc
  569. abstract class $PlayerMatchingErrorCopyWith<$Res> {
  570. factory $PlayerMatchingErrorCopyWith(
  571. PlayerMatchingError value, $Res Function(PlayerMatchingError) then) =
  572. _$PlayerMatchingErrorCopyWithImpl<$Res>;
  573. $Res call({String? message});
  574. }
  575. /// @nodoc
  576. class _$PlayerMatchingErrorCopyWithImpl<$Res>
  577. extends _$PlayerMatchingStateCopyWithImpl<$Res>
  578. implements $PlayerMatchingErrorCopyWith<$Res> {
  579. _$PlayerMatchingErrorCopyWithImpl(
  580. PlayerMatchingError _value, $Res Function(PlayerMatchingError) _then)
  581. : super(_value, (v) => _then(v as PlayerMatchingError));
  582. @override
  583. PlayerMatchingError get _value => super._value as PlayerMatchingError;
  584. @override
  585. $Res call({
  586. Object? message = freezed,
  587. }) {
  588. return _then(PlayerMatchingError(
  589. message: message == freezed
  590. ? _value.message
  591. : message // ignore: cast_nullable_to_non_nullable
  592. as String?,
  593. ));
  594. }
  595. }
  596. /// @nodoc
  597. class _$PlayerMatchingError implements PlayerMatchingError {
  598. const _$PlayerMatchingError({this.message});
  599. @override
  600. final String? message;
  601. @override
  602. String toString() {
  603. return 'PlayerMatchingState.error(message: $message)';
  604. }
  605. @override
  606. bool operator ==(dynamic other) {
  607. return identical(this, other) ||
  608. (other.runtimeType == runtimeType &&
  609. other is PlayerMatchingError &&
  610. const DeepCollectionEquality().equals(other.message, message));
  611. }
  612. @override
  613. int get hashCode =>
  614. Object.hash(runtimeType, const DeepCollectionEquality().hash(message));
  615. @JsonKey(ignore: true)
  616. @override
  617. $PlayerMatchingErrorCopyWith<PlayerMatchingError> get copyWith =>
  618. _$PlayerMatchingErrorCopyWithImpl<PlayerMatchingError>(this, _$identity);
  619. @override
  620. @optionalTypeArgs
  621. TResult when<TResult extends Object?>(
  622. TResult Function() $default, {
  623. required TResult Function() processing,
  624. required TResult Function(String id) isMatched,
  625. required TResult Function() isQueued,
  626. required TResult Function(String? message) error,
  627. }) {
  628. return error(message);
  629. }
  630. @override
  631. @optionalTypeArgs
  632. TResult? whenOrNull<TResult extends Object?>(
  633. TResult Function()? $default, {
  634. TResult Function()? processing,
  635. TResult Function(String id)? isMatched,
  636. TResult Function()? isQueued,
  637. TResult Function(String? message)? error,
  638. }) {
  639. return error?.call(message);
  640. }
  641. @override
  642. @optionalTypeArgs
  643. TResult maybeWhen<TResult extends Object?>(
  644. TResult Function()? $default, {
  645. TResult Function()? processing,
  646. TResult Function(String id)? isMatched,
  647. TResult Function()? isQueued,
  648. TResult Function(String? message)? error,
  649. required TResult orElse(),
  650. }) {
  651. if (error != null) {
  652. return error(message);
  653. }
  654. return orElse();
  655. }
  656. @override
  657. @optionalTypeArgs
  658. TResult map<TResult extends Object?>(
  659. TResult Function(PlayerMatchingIdle value) $default, {
  660. required TResult Function(PlayerMatchingProcessing value) processing,
  661. required TResult Function(PlayerMatched value) isMatched,
  662. required TResult Function(PlayerQueue value) isQueued,
  663. required TResult Function(PlayerMatchingError value) error,
  664. }) {
  665. return error(this);
  666. }
  667. @override
  668. @optionalTypeArgs
  669. TResult? mapOrNull<TResult extends Object?>(
  670. TResult Function(PlayerMatchingIdle value)? $default, {
  671. TResult Function(PlayerMatchingProcessing value)? processing,
  672. TResult Function(PlayerMatched value)? isMatched,
  673. TResult Function(PlayerQueue value)? isQueued,
  674. TResult Function(PlayerMatchingError value)? error,
  675. }) {
  676. return error?.call(this);
  677. }
  678. @override
  679. @optionalTypeArgs
  680. TResult maybeMap<TResult extends Object?>(
  681. TResult Function(PlayerMatchingIdle value)? $default, {
  682. TResult Function(PlayerMatchingProcessing value)? processing,
  683. TResult Function(PlayerMatched value)? isMatched,
  684. TResult Function(PlayerQueue value)? isQueued,
  685. TResult Function(PlayerMatchingError value)? error,
  686. required TResult orElse(),
  687. }) {
  688. if (error != null) {
  689. return error(this);
  690. }
  691. return orElse();
  692. }
  693. }
  694. abstract class PlayerMatchingError implements PlayerMatchingState {
  695. const factory PlayerMatchingError({String? message}) = _$PlayerMatchingError;
  696. String? get message;
  697. @JsonKey(ignore: true)
  698. $PlayerMatchingErrorCopyWith<PlayerMatchingError> get copyWith =>
  699. throw _privateConstructorUsedError;
  700. }