InstancePortState.fromJson constructor
InstancePortState.fromJson(
- Map<String, dynamic> json
)
Implementation
factory InstancePortState.fromJson(Map<String, dynamic> json) {
return InstancePortState(
cidrListAliases: (json['cidrListAliases'] as List?)
?.whereNotNull()
.map((e) => e as String)
.toList(),
cidrs: (json['cidrs'] as List?)
?.whereNotNull()
.map((e) => e as String)
.toList(),
fromPort: json['fromPort'] as int?,
protocol: (json['protocol'] as String?)?.toNetworkProtocol(),
state: (json['state'] as String?)?.toPortState(),
toPort: json['toPort'] as int?,
);
}