fromJson static method

Script fromJson(
  1. dynamic value
)

Returns a new Script instance and imports

Implementation

// ignore: prefer_constructors_over_static_methods
static Script fromJson(dynamic value) {
  final json = value.cast<String, dynamic>();
  return Script(
    id: mapValueOfType<String>(json, r'id'),
    name: mapValueOfType<String>(json, r'name'),
    description: mapValueOfType<String>(json, r'description'),
    orgID: mapValueOfType<String>(json, r'orgID'),
    script: mapValueOfType<String>(json, r'script'),
    language: json[r'language'] == null
        ? null
        : ScriptLanguage.fromJson(json[r'language']),
    url: mapValueOfType<String>(json, r'url'),
    createdAt: mapDateTime(json, r'createdAt', ''),
    updatedAt: mapDateTime(json, r'updatedAt', ''),
  );
}