Node.fromJson constructor

Node.fromJson(
  1. Map json_
)

Implementation

Node.fromJson(core.Map json_)
    : this(
        clientFeatures: json_.containsKey('clientFeatures')
            ? (json_['clientFeatures'] as core.List)
                .map((value) => value as core.String)
                .toList()
            : null,
        cluster: json_.containsKey('cluster')
            ? json_['cluster'] as core.String
            : null,
        dynamicParameters: json_.containsKey('dynamicParameters')
            ? (json_['dynamicParameters']
                    as core.Map<core.String, core.dynamic>)
                .map(
                (key, value) => core.MapEntry(
                  key,
                  ContextParams.fromJson(
                      value as core.Map<core.String, core.dynamic>),
                ),
              )
            : null,
        extensions: json_.containsKey('extensions')
            ? (json_['extensions'] as core.List)
                .map((value) => Extension.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        id: json_.containsKey('id') ? json_['id'] as core.String : null,
        listeningAddresses: json_.containsKey('listeningAddresses')
            ? (json_['listeningAddresses'] as core.List)
                .map((value) => Address.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        locality: json_.containsKey('locality')
            ? Locality.fromJson(
                json_['locality'] as core.Map<core.String, core.dynamic>)
            : null,
        metadata: json_.containsKey('metadata')
            ? json_['metadata'] as core.Map<core.String, core.dynamic>
            : null,
        userAgentBuildVersion: json_.containsKey('userAgentBuildVersion')
            ? BuildVersion.fromJson(json_['userAgentBuildVersion']
                as core.Map<core.String, core.dynamic>)
            : null,
        userAgentName: json_.containsKey('userAgentName')
            ? json_['userAgentName'] as core.String
            : null,
        userAgentVersion: json_.containsKey('userAgentVersion')
            ? json_['userAgentVersion'] as core.String
            : null,
      );