Types.fromJson(Map<String, dynamic> json) { slot = json['slot']; type = json['type'] != null ? NamedAPIResource.fromJson(json['type']) : null; }