ResourceSearchResult.fromJson constructor

ResourceSearchResult.fromJson(
  1. Map json_
)

Implementation

ResourceSearchResult.fromJson(core.Map json_)
    : this(
        additionalAttributes: json_.containsKey('additionalAttributes')
            ? json_['additionalAttributes']
                as core.Map<core.String, core.dynamic>
            : null,
        assetType: json_.containsKey('assetType')
            ? json_['assetType'] as core.String
            : null,
        attachedResources: json_.containsKey('attachedResources')
            ? (json_['attachedResources'] as core.List)
                .map((value) => AttachedResource.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        createTime: json_.containsKey('createTime')
            ? json_['createTime'] as core.String
            : null,
        description: json_.containsKey('description')
            ? json_['description'] as core.String
            : null,
        displayName: json_.containsKey('displayName')
            ? json_['displayName'] as core.String
            : null,
        effectiveTags: json_.containsKey('effectiveTags')
            ? (json_['effectiveTags'] as core.List)
                .map((value) => EffectiveTagDetails.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        folders: json_.containsKey('folders')
            ? (json_['folders'] as core.List)
                .map((value) => value as core.String)
                .toList()
            : null,
        kmsKey: json_.containsKey('kmsKey')
            ? json_['kmsKey'] as core.String
            : null,
        kmsKeys: json_.containsKey('kmsKeys')
            ? (json_['kmsKeys'] as core.List)
                .map((value) => value as core.String)
                .toList()
            : 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,
        location: json_.containsKey('location')
            ? json_['location'] as core.String
            : null,
        name: json_.containsKey('name') ? json_['name'] as core.String : null,
        networkTags: json_.containsKey('networkTags')
            ? (json_['networkTags'] as core.List)
                .map((value) => value as core.String)
                .toList()
            : null,
        organization: json_.containsKey('organization')
            ? json_['organization'] as core.String
            : null,
        parentAssetType: json_.containsKey('parentAssetType')
            ? json_['parentAssetType'] as core.String
            : null,
        parentFullResourceName: json_.containsKey('parentFullResourceName')
            ? json_['parentFullResourceName'] as core.String
            : null,
        project: json_.containsKey('project')
            ? json_['project'] as core.String
            : null,
        relationships: json_.containsKey('relationships')
            ? (json_['relationships'] as core.Map<core.String, core.dynamic>)
                .map(
                (key, value) => core.MapEntry(
                  key,
                  RelatedResources.fromJson(
                      value as core.Map<core.String, core.dynamic>),
                ),
              )
            : null,
        sccSecurityMarks: json_.containsKey('sccSecurityMarks')
            ? (json_['sccSecurityMarks']
                    as core.Map<core.String, core.dynamic>)
                .map(
                (key, value) => core.MapEntry(
                  key,
                  value as core.String,
                ),
              )
            : null,
        state:
            json_.containsKey('state') ? json_['state'] as core.String : null,
        tagKeys: json_.containsKey('tagKeys')
            ? (json_['tagKeys'] as core.List)
                .map((value) => value as core.String)
                .toList()
            : null,
        tagValueIds: json_.containsKey('tagValueIds')
            ? (json_['tagValueIds'] as core.List)
                .map((value) => value as core.String)
                .toList()
            : null,
        tagValues: json_.containsKey('tagValues')
            ? (json_['tagValues'] as core.List)
                .map((value) => value as core.String)
                .toList()
            : null,
        tags: json_.containsKey('tags')
            ? (json_['tags'] as core.List)
                .map((value) => Tag.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        updateTime: json_.containsKey('updateTime')
            ? json_['updateTime'] as core.String
            : null,
        versionedResources: json_.containsKey('versionedResources')
            ? (json_['versionedResources'] as core.List)
                .map((value) => VersionedResource.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
      );