Destination.fromJson constructor

Destination.fromJson(
  1. Map _json
)

Implementation

Destination.fromJson(core.Map _json)
    : this(
        hosts: _json.containsKey('hosts')
            ? (_json['hosts'] as core.List)
                .map<core.String>((value) => value as core.String)
                .toList()
            : null,
        httpHeaderMatch: _json.containsKey('httpHeaderMatch')
            ? HttpHeaderMatch.fromJson(_json['httpHeaderMatch']
                as core.Map<core.String, core.dynamic>)
            : null,
        methods: _json.containsKey('methods')
            ? (_json['methods'] as core.List)
                .map<core.String>((value) => value as core.String)
                .toList()
            : null,
        ports: _json.containsKey('ports')
            ? (_json['ports'] as core.List)
                .map<core.int>((value) => value as core.int)
                .toList()
            : null,
      );