ClusterCIDRSpec.fromJson constructor
Creates a ClusterCIDRSpec from JSON data.
Implementation
factory ClusterCIDRSpec.fromJson(Map<String, dynamic> json) {
final tempIpv4Json = json['ipv4'];
final tempIpv6Json = json['ipv6'];
final tempNodeSelectorJson = json['nodeSelector'];
final tempPerNodeHostBitsJson = json['perNodeHostBits'];
final String? tempIpv4 = tempIpv4Json;
final String? tempIpv6 = tempIpv6Json;
final NodeSelector? tempNodeSelector = tempNodeSelectorJson != null
? NodeSelector.fromJson(tempNodeSelectorJson)
: null;
final int tempPerNodeHostBits = tempPerNodeHostBitsJson;
return ClusterCIDRSpec(
ipv4: tempIpv4,
ipv6: tempIpv6,
nodeSelector: tempNodeSelector,
perNodeHostBits: tempPerNodeHostBits,
);
}