ValidatingWebhookConfiguration.fromJson constructor
Creates a ValidatingWebhookConfiguration from JSON data.
Implementation
factory ValidatingWebhookConfiguration.fromJson(Map<String, dynamic> json) {
final tempApiVersionJson = json['apiVersion'];
final tempKindJson = json['kind'];
final tempMetadataJson = json['metadata'];
final tempWebhooksJson = json['webhooks'];
final String? tempApiVersion = tempApiVersionJson;
final String? tempKind = tempKindJson;
final ObjectMeta? tempMetadata =
tempMetadataJson != null ? ObjectMeta.fromJson(tempMetadataJson) : null;
final List<ValidatingWebhook>? tempWebhooks = tempWebhooksJson != null
? List<dynamic>.from(tempWebhooksJson)
.map(
(e) => ValidatingWebhook.fromJson(
Map<String, dynamic>.from(e),
),
)
.toList()
: null;
return ValidatingWebhookConfiguration(
apiVersion: tempApiVersion,
kind: tempKind,
metadata: tempMetadata,
webhooks: tempWebhooks,
);
}