PipelineDeclaration.fromJson constructor

PipelineDeclaration.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory PipelineDeclaration.fromJson(Map<String, dynamic> json) {
  return PipelineDeclaration(
    name: json['name'] as String,
    roleArn: json['roleArn'] as String,
    stages: (json['stages'] as List)
        .whereNotNull()
        .map((e) => StageDeclaration.fromJson(e as Map<String, dynamic>))
        .toList(),
    artifactStore: json['artifactStore'] != null
        ? ArtifactStore.fromJson(
            json['artifactStore'] as Map<String, dynamic>)
        : null,
    artifactStores: (json['artifactStores'] as Map<String, dynamic>?)?.map(
        (k, e) =>
            MapEntry(k, ArtifactStore.fromJson(e as Map<String, dynamic>))),
    version: json['version'] as int?,
  );
}