DescribeCapacityProvidersResponse.fromJson constructor

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

Implementation

factory DescribeCapacityProvidersResponse.fromJson(
    Map<String, dynamic> json) {
  return DescribeCapacityProvidersResponse(
    capacityProviders: (json['capacityProviders'] as List?)
        ?.whereNotNull()
        .map((e) => CapacityProvider.fromJson(e as Map<String, dynamic>))
        .toList(),
    failures: (json['failures'] as List?)
        ?.whereNotNull()
        .map((e) => Failure.fromJson(e as Map<String, dynamic>))
        .toList(),
    nextToken: json['nextToken'] as String?,
  );
}