ValidatingAdmissionPolicyBindingSpec.fromJson constructor
Creates a ValidatingAdmissionPolicyBindingSpec from JSON data.
Implementation
factory ValidatingAdmissionPolicyBindingSpec.fromJson(
Map<String, dynamic> json) {
final tempMatchResourcesJson = json['matchResources'];
final tempParamRefJson = json['paramRef'];
final tempPolicyNameJson = json['policyName'];
final tempValidationActionsJson = json['validationActions'];
final MatchResources? tempMatchResources = tempMatchResourcesJson != null
? MatchResources.fromJson(tempMatchResourcesJson)
: null;
final ParamRef? tempParamRef =
tempParamRefJson != null ? ParamRef.fromJson(tempParamRefJson) : null;
final String? tempPolicyName = tempPolicyNameJson;
final List<String>? tempValidationActions =
tempValidationActionsJson != null
? List<String>.from(tempValidationActionsJson)
: null;
return ValidatingAdmissionPolicyBindingSpec(
matchResources: tempMatchResources,
paramRef: tempParamRef,
policyName: tempPolicyName,
validationActions: tempValidationActions,
);
}