ContainerPort.fromJson constructor
Creates a ContainerPort from JSON data.
Implementation
factory ContainerPort.fromJson(Map<String, dynamic> json) {
final tempContainerPortJson = json['containerPort'];
final tempHostIPJson = json['hostIP'];
final tempHostPortJson = json['hostPort'];
final tempNameJson = json['name'];
final tempProtocolJson = json['protocol'];
final int tempContainerPort = tempContainerPortJson;
final String? tempHostIP = tempHostIPJson;
final int? tempHostPort = tempHostPortJson;
final String? tempName = tempNameJson;
final String? tempProtocol = tempProtocolJson;
return ContainerPort(
containerPort: tempContainerPort,
hostIP: tempHostIP,
hostPort: tempHostPort,
name: tempName,
protocol: tempProtocol,
);
}