fromJson static method
Returns a new ModerationExportStatusResponse instance and imports its values from
value if it's a Map, null otherwise.
Implementation
// ignore: prefer_constructors_over_static_methods
static ModerationExportStatusResponse? fromJson(dynamic value) {
if (value is Map) {
final json = value.cast<String, dynamic>();
// Ensure that the map contains the required keys.
// Note 1: the values aren't checked for validity beyond being non-null.
// Note 2: this code is stripped in release mode!
assert(() {
assert(json.containsKey(r'status'), 'Required key "ModerationExportStatusResponse[status]" is missing from JSON.');
assert(json[r'status'] != null, 'Required key "ModerationExportStatusResponse[status]" has a null value in JSON.');
assert(json.containsKey(r'jobStatus'), 'Required key "ModerationExportStatusResponse[jobStatus]" is missing from JSON.');
assert(json[r'jobStatus'] != null, 'Required key "ModerationExportStatusResponse[jobStatus]" has a null value in JSON.');
assert(json.containsKey(r'recordCount'), 'Required key "ModerationExportStatusResponse[recordCount]" is missing from JSON.');
assert(json[r'recordCount'] != null, 'Required key "ModerationExportStatusResponse[recordCount]" has a null value in JSON.');
return true;
}());
return ModerationExportStatusResponse(
status: mapValueOfType<String>(json, r'status')!,
jobStatus: mapValueOfType<String>(json, r'jobStatus')!,
recordCount: mapValueOfType<int>(json, r'recordCount')!,
downloadUrl: mapValueOfType<String>(json, r'downloadUrl'),
);
}
return null;
}