toJson method
Converts a IngressTLS instance to JSON data.
Implementation
Map<String, Object> toJson() {
final jsonData = <String, Object>{};
final tempHosts = hosts;
final tempSecretName = secretName;
if (tempHosts != null) {
jsonData['hosts'] = tempHosts;
}
if (tempSecretName != null) {
jsonData['secretName'] = tempSecretName;
}
return jsonData;
}