ValidatingAdmissionPolicyList.fromJson constructor
Creates a ValidatingAdmissionPolicyList from JSON data.
Implementation
factory ValidatingAdmissionPolicyList.fromJson(Map<String, dynamic> json) {
final tempApiVersionJson = json['apiVersion'];
final tempItemsJson = json['items'];
final tempKindJson = json['kind'];
final tempMetadataJson = json['metadata'];
final String? tempApiVersion = tempApiVersionJson;
final List<ValidatingAdmissionPolicy>? tempItems = tempItemsJson != null
? List<dynamic>.from(tempItemsJson)
.map(
(e) => ValidatingAdmissionPolicy.fromJson(
Map<String, dynamic>.from(e),
),
)
.toList()
: null;
final String? tempKind = tempKindJson;
final ListMeta? tempMetadata =
tempMetadataJson != null ? ListMeta.fromJson(tempMetadataJson) : null;
return ValidatingAdmissionPolicyList(
apiVersion: tempApiVersion,
items: tempItems,
kind: tempKind,
metadata: tempMetadata,
);
}