SlsaProvenanceZeroTwo.fromJson constructor

SlsaProvenanceZeroTwo.fromJson(
  1. Map json_
)

Implementation

SlsaProvenanceZeroTwo.fromJson(core.Map json_)
    : this(
        buildConfig: json_.containsKey('buildConfig')
            ? json_['buildConfig'] as core.Map<core.String, core.dynamic>
            : null,
        buildType: json_.containsKey('buildType')
            ? json_['buildType'] as core.String
            : null,
        builder: json_.containsKey('builder')
            ? GrafeasV1SlsaProvenanceZeroTwoSlsaBuilder.fromJson(
                json_['builder'] as core.Map<core.String, core.dynamic>)
            : null,
        invocation: json_.containsKey('invocation')
            ? GrafeasV1SlsaProvenanceZeroTwoSlsaInvocation.fromJson(
                json_['invocation'] as core.Map<core.String, core.dynamic>)
            : null,
        materials: json_.containsKey('materials')
            ? (json_['materials'] as core.List)
                .map((value) =>
                    GrafeasV1SlsaProvenanceZeroTwoSlsaMaterial.fromJson(
                        value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        metadata: json_.containsKey('metadata')
            ? GrafeasV1SlsaProvenanceZeroTwoSlsaMetadata.fromJson(
                json_['metadata'] as core.Map<core.String, core.dynamic>)
            : null,
      );