InstanceSummary.fromJson constructor

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

Implementation

factory InstanceSummary.fromJson(Map<String, dynamic> json) {
  return InstanceSummary(
    deploymentId: json['deploymentId'] as String?,
    instanceId: json['instanceId'] as String?,
    instanceType: (json['instanceType'] as String?)?.toInstanceType(),
    lastUpdatedAt: timeStampFromJson(json['lastUpdatedAt']),
    lifecycleEvents: (json['lifecycleEvents'] as List?)
        ?.whereNotNull()
        .map((e) => LifecycleEvent.fromJson(e as Map<String, dynamic>))
        .toList(),
    status: (json['status'] as String?)?.toInstanceStatus(),
  );
}