Deployment.fromJson constructor
Deployment.fromJson(
- Map<String, dynamic> json
)
Implementation
factory Deployment.fromJson(Map<String, dynamic> json) {
return Deployment(
applicationId: json['ApplicationId'] as String?,
completedAt: timeStampFromJson(json['CompletedAt']),
configurationLocationUri: json['ConfigurationLocationUri'] as String?,
configurationName: json['ConfigurationName'] as String?,
configurationProfileId: json['ConfigurationProfileId'] as String?,
configurationVersion: json['ConfigurationVersion'] as String?,
deploymentDurationInMinutes: json['DeploymentDurationInMinutes'] as int?,
deploymentNumber: json['DeploymentNumber'] as int?,
deploymentStrategyId: json['DeploymentStrategyId'] as String?,
description: json['Description'] as String?,
environmentId: json['EnvironmentId'] as String?,
eventLog: (json['EventLog'] as List?)
?.whereNotNull()
.map((e) => DeploymentEvent.fromJson(e as Map<String, dynamic>))
.toList(),
finalBakeTimeInMinutes: json['FinalBakeTimeInMinutes'] as int?,
growthFactor: json['GrowthFactor'] as double?,
growthType: (json['GrowthType'] as String?)?.toGrowthType(),
percentageComplete: json['PercentageComplete'] as double?,
startedAt: timeStampFromJson(json['StartedAt']),
state: (json['State'] as String?)?.toDeploymentState(),
);
}