InstanceTarget.fromJson constructor

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

Implementation

factory InstanceTarget.fromJson(Map<String, dynamic> json) {
  return InstanceTarget(
    deploymentId: json['deploymentId'] as String?,
    instanceLabel: (json['instanceLabel'] as String?)?.toTargetLabel(),
    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?)?.toTargetStatus(),
    targetArn: json['targetArn'] as String?,
    targetId: json['targetId'] as String?,
  );
}