GetServersResponse.fromJson constructor

GetServersResponse.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory GetServersResponse.fromJson(Map<String, dynamic> json) {
  return GetServersResponse(
    lastModifiedOn: timeStampFromJson(json['lastModifiedOn']),
    nextToken: json['nextToken'] as String?,
    serverCatalogStatus:
        (json['serverCatalogStatus'] as String?)?.toServerCatalogStatus(),
    serverList: (json['serverList'] as List?)
        ?.whereNotNull()
        .map((e) => Server.fromJson(e as Map<String, dynamic>))
        .toList(),
  );
}