Peer.fromJson constructor

Peer.fromJson(
  1. Map json_
)

Implementation

Peer.fromJson(core.Map json_)
    : this(
        ip: json_.containsKey('ip') ? json_['ip'] as core.String : null,
        labels: json_.containsKey('labels')
            ? (json_['labels'] as core.Map<core.String, core.dynamic>).map(
                (key, value) => core.MapEntry(
                  key,
                  value as core.String,
                ),
              )
            : null,
        port: json_.containsKey('port') ? json_['port'] as core.String : null,
        principal: json_.containsKey('principal')
            ? json_['principal'] as core.String
            : null,
        regionCode: json_.containsKey('regionCode')
            ? json_['regionCode'] as core.String
            : null,
      );