NamedRuleWithOperations.fromJson constructor
Creates a NamedRuleWithOperations from JSON data.
Implementation
factory NamedRuleWithOperations.fromJson(Map<String, dynamic> json) {
final tempApiGroupsJson = json['apiGroups'];
final tempApiVersionsJson = json['apiVersions'];
final tempOperationsJson = json['operations'];
final tempResourceNamesJson = json['resourceNames'];
final tempResourcesJson = json['resources'];
final tempScopeJson = json['scope'];
final List<String>? tempApiGroups =
tempApiGroupsJson != null ? List<String>.from(tempApiGroupsJson) : null;
final List<String>? tempApiVersions = tempApiVersionsJson != null
? List<String>.from(tempApiVersionsJson)
: null;
final List<String>? tempOperations = tempOperationsJson != null
? List<String>.from(tempOperationsJson)
: null;
final List<String>? tempResourceNames = tempResourceNamesJson != null
? List<String>.from(tempResourceNamesJson)
: null;
final List<String>? tempResources =
tempResourcesJson != null ? List<String>.from(tempResourcesJson) : null;
final String? tempScope = tempScopeJson;
return NamedRuleWithOperations(
apiGroups: tempApiGroups,
apiVersions: tempApiVersions,
operations: tempOperations,
resourceNames: tempResourceNames,
resources: tempResources,
scope: tempScope,
);
}