failure.freezed.dart 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186
  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 'failure.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. Failure _$FailureFromJson(Map<String, dynamic> json) {
  14. return _Failure.fromJson(json);
  15. }
  16. /// @nodoc
  17. mixin _$Failure {
  18. String? get code => throw _privateConstructorUsedError;
  19. String? get message => throw _privateConstructorUsedError;
  20. /// Serializes this Failure to a JSON map.
  21. Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
  22. /// Create a copy of Failure
  23. /// with the given fields replaced by the non-null parameter values.
  24. @JsonKey(includeFromJson: false, includeToJson: false)
  25. $FailureCopyWith<Failure> get copyWith => throw _privateConstructorUsedError;
  26. }
  27. /// @nodoc
  28. abstract class $FailureCopyWith<$Res> {
  29. factory $FailureCopyWith(Failure value, $Res Function(Failure) then) =
  30. _$FailureCopyWithImpl<$Res, Failure>;
  31. @useResult
  32. $Res call({String? code, String? message});
  33. }
  34. /// @nodoc
  35. class _$FailureCopyWithImpl<$Res, $Val extends Failure>
  36. implements $FailureCopyWith<$Res> {
  37. _$FailureCopyWithImpl(this._value, this._then);
  38. // ignore: unused_field
  39. final $Val _value;
  40. // ignore: unused_field
  41. final $Res Function($Val) _then;
  42. /// Create a copy of Failure
  43. /// with the given fields replaced by the non-null parameter values.
  44. @pragma('vm:prefer-inline')
  45. @override
  46. $Res call({Object? code = freezed, Object? message = freezed}) {
  47. return _then(
  48. _value.copyWith(
  49. code: freezed == code
  50. ? _value.code
  51. : code // ignore: cast_nullable_to_non_nullable
  52. as String?,
  53. message: freezed == message
  54. ? _value.message
  55. : message // ignore: cast_nullable_to_non_nullable
  56. as String?,
  57. )
  58. as $Val,
  59. );
  60. }
  61. }
  62. /// @nodoc
  63. abstract class _$$FailureImplCopyWith<$Res> implements $FailureCopyWith<$Res> {
  64. factory _$$FailureImplCopyWith(
  65. _$FailureImpl value,
  66. $Res Function(_$FailureImpl) then,
  67. ) = __$$FailureImplCopyWithImpl<$Res>;
  68. @override
  69. @useResult
  70. $Res call({String? code, String? message});
  71. }
  72. /// @nodoc
  73. class __$$FailureImplCopyWithImpl<$Res>
  74. extends _$FailureCopyWithImpl<$Res, _$FailureImpl>
  75. implements _$$FailureImplCopyWith<$Res> {
  76. __$$FailureImplCopyWithImpl(
  77. _$FailureImpl _value,
  78. $Res Function(_$FailureImpl) _then,
  79. ) : super(_value, _then);
  80. /// Create a copy of Failure
  81. /// with the given fields replaced by the non-null parameter values.
  82. @pragma('vm:prefer-inline')
  83. @override
  84. $Res call({Object? code = freezed, Object? message = freezed}) {
  85. return _then(
  86. _$FailureImpl(
  87. code: freezed == code
  88. ? _value.code
  89. : code // ignore: cast_nullable_to_non_nullable
  90. as String?,
  91. message: freezed == message
  92. ? _value.message
  93. : message // ignore: cast_nullable_to_non_nullable
  94. as String?,
  95. ),
  96. );
  97. }
  98. }
  99. /// @nodoc
  100. @JsonSerializable()
  101. class _$FailureImpl with DiagnosticableTreeMixin implements _Failure {
  102. const _$FailureImpl({this.code, this.message});
  103. factory _$FailureImpl.fromJson(Map<String, dynamic> json) =>
  104. _$$FailureImplFromJson(json);
  105. @override
  106. final String? code;
  107. @override
  108. final String? message;
  109. @override
  110. String toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) {
  111. return 'Failure(code: $code, message: $message)';
  112. }
  113. @override
  114. void debugFillProperties(DiagnosticPropertiesBuilder properties) {
  115. super.debugFillProperties(properties);
  116. properties
  117. ..add(DiagnosticsProperty('type', 'Failure'))
  118. ..add(DiagnosticsProperty('code', code))
  119. ..add(DiagnosticsProperty('message', message));
  120. }
  121. @override
  122. bool operator ==(Object other) {
  123. return identical(this, other) ||
  124. (other.runtimeType == runtimeType &&
  125. other is _$FailureImpl &&
  126. (identical(other.code, code) || other.code == code) &&
  127. (identical(other.message, message) || other.message == message));
  128. }
  129. @JsonKey(includeFromJson: false, includeToJson: false)
  130. @override
  131. int get hashCode => Object.hash(runtimeType, code, message);
  132. /// Create a copy of Failure
  133. /// with the given fields replaced by the non-null parameter values.
  134. @JsonKey(includeFromJson: false, includeToJson: false)
  135. @override
  136. @pragma('vm:prefer-inline')
  137. _$$FailureImplCopyWith<_$FailureImpl> get copyWith =>
  138. __$$FailureImplCopyWithImpl<_$FailureImpl>(this, _$identity);
  139. @override
  140. Map<String, dynamic> toJson() {
  141. return _$$FailureImplToJson(this);
  142. }
  143. }
  144. abstract class _Failure implements Failure {
  145. const factory _Failure({final String? code, final String? message}) =
  146. _$FailureImpl;
  147. factory _Failure.fromJson(Map<String, dynamic> json) = _$FailureImpl.fromJson;
  148. @override
  149. String? get code;
  150. @override
  151. String? get message;
  152. /// Create a copy of Failure
  153. /// with the given fields replaced by the non-null parameter values.
  154. @override
  155. @JsonKey(includeFromJson: false, includeToJson: false)
  156. _$$FailureImplCopyWith<_$FailureImpl> get copyWith =>
  157. throw _privateConstructorUsedError;
  158. }