AggregationRule.fromJson constructor
Creates a AggregationRule from JSON data.
Implementation
factory AggregationRule.fromJson(Map<String, dynamic> json) {
final tempClusterRoleSelectorsJson = json['clusterRoleSelectors'];
final List<LabelSelector>? tempClusterRoleSelectors =
tempClusterRoleSelectorsJson != null
? List<dynamic>.from(tempClusterRoleSelectorsJson)
.map(
(e) => LabelSelector.fromJson(
Map<String, dynamic>.from(e),
),
)
.toList()
: null;
return AggregationRule(
clusterRoleSelectors: tempClusterRoleSelectors,
);
}