DestinationPortMapping.fromJson constructor

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

Implementation

factory DestinationPortMapping.fromJson(Map<String, dynamic> json) {
  return DestinationPortMapping(
    acceleratorArn: json['AcceleratorArn'] as String?,
    acceleratorSocketAddresses: (json['AcceleratorSocketAddresses'] as List?)
        ?.whereNotNull()
        .map((e) => SocketAddress.fromJson(e as Map<String, dynamic>))
        .toList(),
    destinationSocketAddress: json['DestinationSocketAddress'] != null
        ? SocketAddress.fromJson(
            json['DestinationSocketAddress'] as Map<String, dynamic>)
        : null,
    destinationTrafficState: (json['DestinationTrafficState'] as String?)
        ?.toCustomRoutingDestinationTrafficState(),
    endpointGroupArn: json['EndpointGroupArn'] as String?,
    endpointGroupRegion: json['EndpointGroupRegion'] as String?,
    endpointId: json['EndpointId'] as String?,
    ipAddressType: (json['IpAddressType'] as String?)?.toIpAddressType(),
  );
}