ScopeSelector.fromJson constructor
Creates a ScopeSelector from JSON data.
Implementation
factory ScopeSelector.fromJson(Map<String, dynamic> json) {
final tempMatchExpressionsJson = json['matchExpressions'];
final List<ScopedResourceSelectorRequirement>? tempMatchExpressions =
tempMatchExpressionsJson != null
? List<dynamic>.from(tempMatchExpressionsJson)
.map(
(e) => ScopedResourceSelectorRequirement.fromJson(
Map<String, dynamic>.from(e),
),
)
.toList()
: null;
return ScopeSelector(
matchExpressions: tempMatchExpressions,
);
}