AssistDescription.fromJson constructor
AssistDescription.fromJson(})
Implementation
factory AssistDescription.fromJson(
JsonDecoder jsonDecoder,
String jsonPath,
Object? json, {
ClientUriConverter? clientUriConverter,
}) {
json ??= {};
if (json is Map) {
String id;
if (json.containsKey('id')) {
id = jsonDecoder.decodeString('$jsonPath.id', json['id']);
} else {
throw jsonDecoder.mismatch(jsonPath, "'id'", json);
}
String message;
if (json.containsKey('message')) {
message = jsonDecoder.decodeString(
'$jsonPath.message',
json['message'],
);
} else {
throw jsonDecoder.mismatch(jsonPath, "'message'", json);
}
return AssistDescription(id, message);
} else {
throw jsonDecoder.mismatch(jsonPath, "'AssistDescription'", json);
}
}