AttributeContext.fromJson constructor

AttributeContext.fromJson(
  1. Map json_
)

Implementation

AttributeContext.fromJson(core.Map json_)
    : this(
        api: json_.containsKey('api')
            ? Api.fromJson(
                json_['api'] as core.Map<core.String, core.dynamic>)
            : null,
        destination: json_.containsKey('destination')
            ? Peer.fromJson(
                json_['destination'] as core.Map<core.String, core.dynamic>)
            : null,
        extensions: json_.containsKey('extensions')
            ? (json_['extensions'] as core.List)
                .map((value) => value as core.Map<core.String, core.dynamic>)
                .toList()
            : null,
        origin: json_.containsKey('origin')
            ? Peer.fromJson(
                json_['origin'] as core.Map<core.String, core.dynamic>)
            : null,
        request: json_.containsKey('request')
            ? Request.fromJson(
                json_['request'] as core.Map<core.String, core.dynamic>)
            : null,
        resource: json_.containsKey('resource')
            ? Resource.fromJson(
                json_['resource'] as core.Map<core.String, core.dynamic>)
            : null,
        response: json_.containsKey('response')
            ? Response.fromJson(
                json_['response'] as core.Map<core.String, core.dynamic>)
            : null,
        source: json_.containsKey('source')
            ? Peer.fromJson(
                json_['source'] as core.Map<core.String, core.dynamic>)
            : null,
      );