CustomRoutingDestinationDescription.fromJson constructor

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

Implementation

factory CustomRoutingDestinationDescription.fromJson(
    Map<String, dynamic> json) {
  return CustomRoutingDestinationDescription(
    fromPort: json['FromPort'] as int?,
    protocols: (json['Protocols'] as List?)
        ?.whereNotNull()
        .map((e) => (e as String).toProtocol())
        .toList(),
    toPort: json['ToPort'] as int?,
  );
}