sync_response_dto.freezed.dart 9.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293
  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 'sync_response_dto.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. SyncResponseDto _$SyncResponseDtoFromJson(Map<String, dynamic> json) {
  14. return _SyncResponseDto.fromJson(json);
  15. }
  16. /// @nodoc
  17. mixin _$SyncResponseDto {
  18. int get status => throw _privateConstructorUsedError;
  19. String get statusText => throw _privateConstructorUsedError;
  20. int? get idAssegnato => throw _privateConstructorUsedError;
  21. List<String> get messages => throw _privateConstructorUsedError;
  22. List<String> get validationErrors => throw _privateConstructorUsedError;
  23. /// Serializes this SyncResponseDto to a JSON map.
  24. Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
  25. /// Create a copy of SyncResponseDto
  26. /// with the given fields replaced by the non-null parameter values.
  27. @JsonKey(includeFromJson: false, includeToJson: false)
  28. $SyncResponseDtoCopyWith<SyncResponseDto> get copyWith =>
  29. throw _privateConstructorUsedError;
  30. }
  31. /// @nodoc
  32. abstract class $SyncResponseDtoCopyWith<$Res> {
  33. factory $SyncResponseDtoCopyWith(
  34. SyncResponseDto value,
  35. $Res Function(SyncResponseDto) then,
  36. ) = _$SyncResponseDtoCopyWithImpl<$Res, SyncResponseDto>;
  37. @useResult
  38. $Res call({
  39. int status,
  40. String statusText,
  41. int? idAssegnato,
  42. List<String> messages,
  43. List<String> validationErrors,
  44. });
  45. }
  46. /// @nodoc
  47. class _$SyncResponseDtoCopyWithImpl<$Res, $Val extends SyncResponseDto>
  48. implements $SyncResponseDtoCopyWith<$Res> {
  49. _$SyncResponseDtoCopyWithImpl(this._value, this._then);
  50. // ignore: unused_field
  51. final $Val _value;
  52. // ignore: unused_field
  53. final $Res Function($Val) _then;
  54. /// Create a copy of SyncResponseDto
  55. /// with the given fields replaced by the non-null parameter values.
  56. @pragma('vm:prefer-inline')
  57. @override
  58. $Res call({
  59. Object? status = null,
  60. Object? statusText = null,
  61. Object? idAssegnato = freezed,
  62. Object? messages = null,
  63. Object? validationErrors = null,
  64. }) {
  65. return _then(
  66. _value.copyWith(
  67. status: null == status
  68. ? _value.status
  69. : status // ignore: cast_nullable_to_non_nullable
  70. as int,
  71. statusText: null == statusText
  72. ? _value.statusText
  73. : statusText // ignore: cast_nullable_to_non_nullable
  74. as String,
  75. idAssegnato: freezed == idAssegnato
  76. ? _value.idAssegnato
  77. : idAssegnato // ignore: cast_nullable_to_non_nullable
  78. as int?,
  79. messages: null == messages
  80. ? _value.messages
  81. : messages // ignore: cast_nullable_to_non_nullable
  82. as List<String>,
  83. validationErrors: null == validationErrors
  84. ? _value.validationErrors
  85. : validationErrors // ignore: cast_nullable_to_non_nullable
  86. as List<String>,
  87. )
  88. as $Val,
  89. );
  90. }
  91. }
  92. /// @nodoc
  93. abstract class _$$SyncResponseDtoImplCopyWith<$Res>
  94. implements $SyncResponseDtoCopyWith<$Res> {
  95. factory _$$SyncResponseDtoImplCopyWith(
  96. _$SyncResponseDtoImpl value,
  97. $Res Function(_$SyncResponseDtoImpl) then,
  98. ) = __$$SyncResponseDtoImplCopyWithImpl<$Res>;
  99. @override
  100. @useResult
  101. $Res call({
  102. int status,
  103. String statusText,
  104. int? idAssegnato,
  105. List<String> messages,
  106. List<String> validationErrors,
  107. });
  108. }
  109. /// @nodoc
  110. class __$$SyncResponseDtoImplCopyWithImpl<$Res>
  111. extends _$SyncResponseDtoCopyWithImpl<$Res, _$SyncResponseDtoImpl>
  112. implements _$$SyncResponseDtoImplCopyWith<$Res> {
  113. __$$SyncResponseDtoImplCopyWithImpl(
  114. _$SyncResponseDtoImpl _value,
  115. $Res Function(_$SyncResponseDtoImpl) _then,
  116. ) : super(_value, _then);
  117. /// Create a copy of SyncResponseDto
  118. /// with the given fields replaced by the non-null parameter values.
  119. @pragma('vm:prefer-inline')
  120. @override
  121. $Res call({
  122. Object? status = null,
  123. Object? statusText = null,
  124. Object? idAssegnato = freezed,
  125. Object? messages = null,
  126. Object? validationErrors = null,
  127. }) {
  128. return _then(
  129. _$SyncResponseDtoImpl(
  130. status: null == status
  131. ? _value.status
  132. : status // ignore: cast_nullable_to_non_nullable
  133. as int,
  134. statusText: null == statusText
  135. ? _value.statusText
  136. : statusText // ignore: cast_nullable_to_non_nullable
  137. as String,
  138. idAssegnato: freezed == idAssegnato
  139. ? _value.idAssegnato
  140. : idAssegnato // ignore: cast_nullable_to_non_nullable
  141. as int?,
  142. messages: null == messages
  143. ? _value._messages
  144. : messages // ignore: cast_nullable_to_non_nullable
  145. as List<String>,
  146. validationErrors: null == validationErrors
  147. ? _value._validationErrors
  148. : validationErrors // ignore: cast_nullable_to_non_nullable
  149. as List<String>,
  150. ),
  151. );
  152. }
  153. }
  154. /// @nodoc
  155. @JsonSerializable()
  156. class _$SyncResponseDtoImpl extends _SyncResponseDto {
  157. const _$SyncResponseDtoImpl({
  158. this.status = 0,
  159. this.statusText = 'OK',
  160. this.idAssegnato,
  161. final List<String> messages = const [],
  162. final List<String> validationErrors = const [],
  163. }) : _messages = messages,
  164. _validationErrors = validationErrors,
  165. super._();
  166. factory _$SyncResponseDtoImpl.fromJson(Map<String, dynamic> json) =>
  167. _$$SyncResponseDtoImplFromJson(json);
  168. @override
  169. @JsonKey()
  170. final int status;
  171. @override
  172. @JsonKey()
  173. final String statusText;
  174. @override
  175. final int? idAssegnato;
  176. final List<String> _messages;
  177. @override
  178. @JsonKey()
  179. List<String> get messages {
  180. if (_messages is EqualUnmodifiableListView) return _messages;
  181. // ignore: implicit_dynamic_type
  182. return EqualUnmodifiableListView(_messages);
  183. }
  184. final List<String> _validationErrors;
  185. @override
  186. @JsonKey()
  187. List<String> get validationErrors {
  188. if (_validationErrors is EqualUnmodifiableListView)
  189. return _validationErrors;
  190. // ignore: implicit_dynamic_type
  191. return EqualUnmodifiableListView(_validationErrors);
  192. }
  193. @override
  194. String toString() {
  195. return 'SyncResponseDto(status: $status, statusText: $statusText, idAssegnato: $idAssegnato, messages: $messages, validationErrors: $validationErrors)';
  196. }
  197. @override
  198. bool operator ==(Object other) {
  199. return identical(this, other) ||
  200. (other.runtimeType == runtimeType &&
  201. other is _$SyncResponseDtoImpl &&
  202. (identical(other.status, status) || other.status == status) &&
  203. (identical(other.statusText, statusText) ||
  204. other.statusText == statusText) &&
  205. (identical(other.idAssegnato, idAssegnato) ||
  206. other.idAssegnato == idAssegnato) &&
  207. const DeepCollectionEquality().equals(other._messages, _messages) &&
  208. const DeepCollectionEquality().equals(
  209. other._validationErrors,
  210. _validationErrors,
  211. ));
  212. }
  213. @JsonKey(includeFromJson: false, includeToJson: false)
  214. @override
  215. int get hashCode => Object.hash(
  216. runtimeType,
  217. status,
  218. statusText,
  219. idAssegnato,
  220. const DeepCollectionEquality().hash(_messages),
  221. const DeepCollectionEquality().hash(_validationErrors),
  222. );
  223. /// Create a copy of SyncResponseDto
  224. /// with the given fields replaced by the non-null parameter values.
  225. @JsonKey(includeFromJson: false, includeToJson: false)
  226. @override
  227. @pragma('vm:prefer-inline')
  228. _$$SyncResponseDtoImplCopyWith<_$SyncResponseDtoImpl> get copyWith =>
  229. __$$SyncResponseDtoImplCopyWithImpl<_$SyncResponseDtoImpl>(
  230. this,
  231. _$identity,
  232. );
  233. @override
  234. Map<String, dynamic> toJson() {
  235. return _$$SyncResponseDtoImplToJson(this);
  236. }
  237. }
  238. abstract class _SyncResponseDto extends SyncResponseDto {
  239. const factory _SyncResponseDto({
  240. final int status,
  241. final String statusText,
  242. final int? idAssegnato,
  243. final List<String> messages,
  244. final List<String> validationErrors,
  245. }) = _$SyncResponseDtoImpl;
  246. const _SyncResponseDto._() : super._();
  247. factory _SyncResponseDto.fromJson(Map<String, dynamic> json) =
  248. _$SyncResponseDtoImpl.fromJson;
  249. @override
  250. int get status;
  251. @override
  252. String get statusText;
  253. @override
  254. int? get idAssegnato;
  255. @override
  256. List<String> get messages;
  257. @override
  258. List<String> get validationErrors;
  259. /// Create a copy of SyncResponseDto
  260. /// with the given fields replaced by the non-null parameter values.
  261. @override
  262. @JsonKey(includeFromJson: false, includeToJson: false)
  263. _$$SyncResponseDtoImplCopyWith<_$SyncResponseDtoImpl> get copyWith =>
  264. throw _privateConstructorUsedError;
  265. }