Distribution.fromJson constructor

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

Implementation

factory Distribution.fromJson(Map<String, dynamic> json) {
  return Distribution(
    region: json['region'] as String,
    amiDistributionConfiguration: json['amiDistributionConfiguration'] != null
        ? AmiDistributionConfiguration.fromJson(
            json['amiDistributionConfiguration'] as Map<String, dynamic>)
        : null,
    containerDistributionConfiguration:
        json['containerDistributionConfiguration'] != null
            ? ContainerDistributionConfiguration.fromJson(
                json['containerDistributionConfiguration']
                    as Map<String, dynamic>)
            : null,
    licenseConfigurationArns: (json['licenseConfigurationArns'] as List?)
        ?.whereNotNull()
        .map((e) => e as String)
        .toList(),
  );
}