IngressServiceBackend.fromJson constructor

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

Creates a IngressServiceBackend from JSON data.

Implementation

factory IngressServiceBackend.fromJson(Map<String, dynamic> json) {
  final tempNameJson = json['name'];
  final tempPortJson = json['port'];

  final String tempName = tempNameJson;
  final ServiceBackendPort? tempPort =
      tempPortJson != null ? ServiceBackendPort.fromJson(tempPortJson) : null;

  return IngressServiceBackend(
    name: tempName,
    port: tempPort,
  );
}