Binding.fromJson constructor

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

Creates a Binding from JSON data.

Implementation

factory Binding.fromJson(Map<String, dynamic> json) {
  final tempApiVersionJson = json['apiVersion'];
  final tempKindJson = json['kind'];
  final tempMetadataJson = json['metadata'];
  final tempTargetJson = json['target'];

  final String? tempApiVersion = tempApiVersionJson;
  final String? tempKind = tempKindJson;
  final ObjectMeta? tempMetadata =
      tempMetadataJson != null ? ObjectMeta.fromJson(tempMetadataJson) : null;
  final ObjectReference tempTarget = ObjectReference.fromJson(tempTargetJson);

  return Binding(
    apiVersion: tempApiVersion,
    kind: tempKind,
    metadata: tempMetadata,
    target: tempTarget,
  );
}