NetworkPolicyPort.fromJson constructor
Creates a NetworkPolicyPort from JSON data.
Implementation
factory NetworkPolicyPort.fromJson(Map<String, dynamic> json) {
final tempEndPortJson = json['endPort'];
final tempPortJson = json['port'];
final tempProtocolJson = json['protocol'];
final int? tempEndPort = tempEndPortJson;
final IntOrString? tempPort =
tempPortJson != null ? IntOrString(tempPortJson) : null;
final String? tempProtocol = tempProtocolJson;
return NetworkPolicyPort(
endPort: tempEndPort,
port: tempPort,
protocol: tempProtocol,
);
}