ResourcePolicyRule.fromJson constructor

ResourcePolicyRule.fromJson(
  1. Map<String, dynamic> json
)

Creates a ResourcePolicyRule from JSON data.

Implementation

ResourcePolicyRule.fromJson(Map<String, dynamic> json)
    : this(
        apiGroups: json['apiGroups'] != null
            ? List<String>.from(json['apiGroups'])
            : [],
        clusterScope: json['clusterScope'],
        namespaces: json['namespaces'] != null
            ? List<String>.from(json['namespaces'])
            : null,
        resources: json['resources'] != null
            ? List<String>.from(json['resources'])
            : [],
        verbs: json['verbs'] != null ? List<String>.from(json['verbs']) : [],
      );