ValuedResource.fromJson constructor

ValuedResource.fromJson(
  1. Map json_
)

Implementation

ValuedResource.fromJson(core.Map json_)
    : this(
        displayName: json_.containsKey('displayName')
            ? json_['displayName'] as core.String
            : null,
        exposedScore: json_.containsKey('exposedScore')
            ? (json_['exposedScore'] as core.num).toDouble()
            : null,
        name: json_.containsKey('name') ? json_['name'] as core.String : null,
        resource: json_.containsKey('resource')
            ? json_['resource'] as core.String
            : null,
        resourceType: json_.containsKey('resourceType')
            ? json_['resourceType'] as core.String
            : null,
        resourceValue: json_.containsKey('resourceValue')
            ? json_['resourceValue'] as core.String
            : null,
        resourceValueConfigsUsed:
            json_.containsKey('resourceValueConfigsUsed')
                ? (json_['resourceValueConfigsUsed'] as core.List)
                    .map((value) => ResourceValueConfigMetadata.fromJson(
                        value as core.Map<core.String, core.dynamic>))
                    .toList()
                : null,
      );