Link.fromJson constructor

Link.fromJson(
  1. Map _json
)

Implementation

Link.fromJson(core.Map _json)
    : this(
        byproducts: _json.containsKey('byproducts')
            ? ByProducts.fromJson(
                _json['byproducts'] as core.Map<core.String, core.dynamic>)
            : null,
        command: _json.containsKey('command')
            ? (_json['command'] as core.List)
                .map<core.String>((value) => value as core.String)
                .toList()
            : null,
        environment: _json.containsKey('environment')
            ? Environment.fromJson(
                _json['environment'] as core.Map<core.String, core.dynamic>)
            : null,
        materials: _json.containsKey('materials')
            ? (_json['materials'] as core.List)
                .map<GrafeasV1beta1IntotoArtifact>((value) =>
                    GrafeasV1beta1IntotoArtifact.fromJson(
                        value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        products: _json.containsKey('products')
            ? (_json['products'] as core.List)
                .map<GrafeasV1beta1IntotoArtifact>((value) =>
                    GrafeasV1beta1IntotoArtifact.fromJson(
                        value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
      );