Project.fromJson constructor
Project.fromJson(
- Map<String, dynamic> json
)
Implementation
factory Project.fromJson(Map<String, dynamic> json) {
return Project(
arn: json['arn'] as String?,
artifacts: json['artifacts'] != null
? ProjectArtifacts.fromJson(json['artifacts'] as Map<String, dynamic>)
: null,
badge: json['badge'] != null
? ProjectBadge.fromJson(json['badge'] as Map<String, dynamic>)
: null,
buildBatchConfig: json['buildBatchConfig'] != null
? ProjectBuildBatchConfig.fromJson(
json['buildBatchConfig'] as Map<String, dynamic>)
: null,
cache: json['cache'] != null
? ProjectCache.fromJson(json['cache'] as Map<String, dynamic>)
: null,
created: timeStampFromJson(json['created']),
description: json['description'] as String?,
encryptionKey: json['encryptionKey'] as String?,
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(),
lastModified: timeStampFromJson(json['lastModified']),
logsConfig: json['logsConfig'] != null
? LogsConfig.fromJson(json['logsConfig'] as Map<String, dynamic>)
: null,
name: json['name'] as String?,
queuedTimeoutInMinutes: json['queuedTimeoutInMinutes'] as int?,
secondaryArtifacts: (json['secondaryArtifacts'] as List?)
?.whereNotNull()
.map((e) => ProjectArtifacts.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?,
tags: (json['tags'] as List?)
?.whereNotNull()
.map((e) => Tag.fromJson(e as Map<String, dynamic>))
.toList(),
timeoutInMinutes: json['timeoutInMinutes'] as int?,
vpcConfig: json['vpcConfig'] != null
? VpcConfig.fromJson(json['vpcConfig'] as Map<String, dynamic>)
: null,
webhook: json['webhook'] != null
? Webhook.fromJson(json['webhook'] as Map<String, dynamic>)
: null,
);
}