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({
|
2021-11-29 23:44:22 +00:00
|
|
|
required this.status,
|
|
|
|
required this.message,
|
|
|
|
required this.errorId,
|
2021-02-02 14:33:23 +00:00
|
|
|
}); // JSON Init
|
|
|
|
|
2022-06-22 22:44:08 +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);
|
|
|
|
}
|