toJson method
Converts a EndpointPort instance to JSON data.
Implementation
Map<String, Object> toJson() {
final jsonData = <String, Object>{};
final tempAppProtocol = appProtocol;
final tempName = name;
final tempPort = port;
final tempProtocol = protocol;
if (tempAppProtocol != null) {
jsonData['appProtocol'] = tempAppProtocol;
}
if (tempName != null) {
jsonData['name'] = tempName;
}
jsonData['port'] = tempPort;
if (tempProtocol != null) {
jsonData['protocol'] = tempProtocol;
}
return jsonData;
}