InToto.fromJson constructor

InToto.fromJson(
  1. Map _json
)

Implementation

InToto.fromJson(core.Map _json)
    : this(
        expectedCommand: _json.containsKey('expectedCommand')
            ? (_json['expectedCommand'] as core.List)
                .map<core.String>((value) => value as core.String)
                .toList()
            : null,
        expectedMaterials: _json.containsKey('expectedMaterials')
            ? (_json['expectedMaterials'] as core.List)
                .map<ArtifactRule>((value) => ArtifactRule.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        expectedProducts: _json.containsKey('expectedProducts')
            ? (_json['expectedProducts'] as core.List)
                .map<ArtifactRule>((value) => ArtifactRule.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        signingKeys: _json.containsKey('signingKeys')
            ? (_json['signingKeys'] as core.List)
                .map<SigningKey>((value) => SigningKey.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        stepName: _json.containsKey('stepName')
            ? _json['stepName'] as core.String
            : null,
        threshold: _json.containsKey('threshold')
            ? _json['threshold'] as core.String
            : null,
      );