IngressRule.fromJson constructor

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

Creates a IngressRule from JSON data.

Implementation

factory IngressRule.fromJson(Map<String, dynamic> json) {
  final tempHostJson = json['host'];
  final tempHttpJson = json['http'];

  final String? tempHost = tempHostJson;
  final HTTPIngressRuleValue? tempHttp = tempHttpJson != null
      ? HTTPIngressRuleValue.fromJson(tempHttpJson)
      : null;

  return IngressRule(
    host: tempHost,
    http: tempHttp,
  );
}