fbmobile/lib/core/models/rest/rest_error.dart

24 lines
508 B
Dart
Raw Normal View History

2021-02-02 14:33:23 +00:00
import 'package:json_annotation/json_annotation.dart';
part 'rest_error.g.dart';
@JsonSerializable()
class RestError {
final String status;
final String message;
@JsonKey(name: "error_id")
final String errorId;
RestError({
required this.status,
required this.message,
required this.errorId,
2021-02-02 14:33:23 +00:00
}); // JSON Init
2023-01-16 00:44:34 +00:00
factory RestError.fromJson(Map<String, dynamic> json) =>
_$RestErrorFromJson(json);
2021-02-02 14:33:23 +00:00
// JSON Export
Map<String, dynamic> toJson() => _$RestErrorToJson(this);
}