BuildBatch.fromJson constructor
BuildBatch.fromJson(
- Map<String, dynamic> json
)
Implementation
factory BuildBatch.fromJson(Map<String, dynamic> json) {
return BuildBatch(
arn: json['arn'] as String?,
artifacts: json['artifacts'] != null
? BuildArtifacts.fromJson(json['artifacts'] as Map<String, dynamic>)
: null,
buildBatchConfig: json['buildBatchConfig'] != null
? ProjectBuildBatchConfig.fromJson(
json['buildBatchConfig'] as Map<String, dynamic>)
: null,
buildBatchNumber: json['buildBatchNumber'] as int?,
buildBatchStatus: (json['buildBatchStatus'] as String?)?.toStatusType(),
buildGroups: (json['buildGroups'] as List?)
?.whereNotNull()
.map((e) => BuildGroup.fromJson(e as Map<String, dynamic>))
.toList(),
buildTimeoutInMinutes: json['buildTimeoutInMinutes'] as int?,
cache: json['cache'] != null
? ProjectCache.fromJson(json['cache'] as Map<String, dynamic>)
: null,
complete: json['complete'] as bool?,
currentPhase: json['currentPhase'] as String?,
encryptionKey: json['encryptionKey'] as String?,
endTime: timeStampFromJson(json['endTime']),
environment: json['environment'] != null
? ProjectEnvironment.fromJson(
json['environment'] as Map<String, dynamic>)
: null,
fileSystemLocations: (json['fileSystemLocations'] as List?)
?.whereNotNull()
.map((e) =>
ProjectFileSystemLocation.fromJson(e as Map<String, dynamic>))
.toList(),
id: json['id'] as String?,
initiator: json['initiator'] as String?,
logConfig: json['logConfig'] != null
? LogsConfig.fromJson(json['logConfig'] as Map<String, dynamic>)
: null,
phases: (json['phases'] as List?)
?.whereNotNull()
.map((e) => BuildBatchPhase.fromJson(e as Map<String, dynamic>))
.toList(),
projectName: json['projectName'] as String?,
queuedTimeoutInMinutes: json['queuedTimeoutInMinutes'] as int?,
resolvedSourceVersion: json['resolvedSourceVersion'] as String?,
secondaryArtifacts: (json['secondaryArtifacts'] as List?)
?.whereNotNull()
.map((e) => BuildArtifacts.fromJson(e as Map<String, dynamic>))
.toList(),
secondarySourceVersions: (json['secondarySourceVersions'] as List?)
?.whereNotNull()
.map((e) => ProjectSourceVersion.fromJson(e as Map<String, dynamic>))
.toList(),
secondarySources: (json['secondarySources'] as List?)
?.whereNotNull()
.map((e) => ProjectSource.fromJson(e as Map<String, dynamic>))
.toList(),
serviceRole: json['serviceRole'] as String?,
source: json['source'] != null
? ProjectSource.fromJson(json['source'] as Map<String, dynamic>)
: null,
sourceVersion: json['sourceVersion'] as String?,
startTime: timeStampFromJson(json['startTime']),
vpcConfig: json['vpcConfig'] != null
? VpcConfig.fromJson(json['vpcConfig'] as Map<String, dynamic>)
: null,
);
}