RequestTypeDTO.fromJson constructor

RequestTypeDTO.fromJson(
  1. Map<String, Object?> json
)

Implementation

factory RequestTypeDTO.fromJson(Map<String, Object?> json) {
  return RequestTypeDTO(
    expands: (json[r'_expands'] as List<Object?>?)
            ?.map((i) => i as String? ?? '')
            .toList() ??
        [],
    links: json[r'_links'] != null
        ? SelfLinkDTO.fromJson(json[r'_links']! as Map<String, Object?>)
        : null,
    description: json[r'description'] as String?,
    fields: json[r'fields'] != null
        ? CustomerRequestCreateMetaDTO.fromJson(
            json[r'fields']! as Map<String, Object?>)
        : null,
    groupIds: (json[r'groupIds'] as List<Object?>?)
            ?.map((i) => i as String? ?? '')
            .toList() ??
        [],
    helpText: json[r'helpText'] as String?,
    icon: json[r'icon'] != null
        ? RequestTypeIconDTO.fromJson(json[r'icon']! as Map<String, Object?>)
        : null,
    id: json[r'id'] as String?,
    issueTypeId: json[r'issueTypeId'] as String?,
    name: json[r'name'] as String?,
    portalId: json[r'portalId'] as String?,
    practice: json[r'practice'] as String?,
    serviceDeskId: json[r'serviceDeskId'] as String?,
  );
}