CapacityProvider.fromJson constructor

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

Implementation

factory CapacityProvider.fromJson(Map<String, dynamic> json) {
  return CapacityProvider(
    autoScalingGroupProvider: json['autoScalingGroupProvider'] != null
        ? AutoScalingGroupProvider.fromJson(
            json['autoScalingGroupProvider'] as Map<String, dynamic>)
        : null,
    capacityProviderArn: json['capacityProviderArn'] as String?,
    name: json['name'] as String?,
    status: (json['status'] as String?)?.toCapacityProviderStatus(),
    tags: (json['tags'] as List?)
        ?.whereNotNull()
        .map((e) => Tag.fromJson(e as Map<String, dynamic>))
        .toList(),
    updateStatus:
        (json['updateStatus'] as String?)?.toCapacityProviderUpdateStatus(),
    updateStatusReason: json['updateStatusReason'] as String?,
  );
}