Deployment.fromJson constructor

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

Implementation

factory Deployment.fromJson(Map<String, dynamic> json) {
  return Deployment(
    capacityProviderStrategy: (json['capacityProviderStrategy'] as List?)
        ?.whereNotNull()
        .map((e) =>
            CapacityProviderStrategyItem.fromJson(e as Map<String, dynamic>))
        .toList(),
    createdAt: timeStampFromJson(json['createdAt']),
    desiredCount: json['desiredCount'] as int?,
    failedTasks: json['failedTasks'] as int?,
    id: json['id'] as String?,
    launchType: (json['launchType'] as String?)?.toLaunchType(),
    networkConfiguration: json['networkConfiguration'] != null
        ? NetworkConfiguration.fromJson(
            json['networkConfiguration'] as Map<String, dynamic>)
        : null,
    pendingCount: json['pendingCount'] as int?,
    platformVersion: json['platformVersion'] as String?,
    rolloutState:
        (json['rolloutState'] as String?)?.toDeploymentRolloutState(),
    rolloutStateReason: json['rolloutStateReason'] as String?,
    runningCount: json['runningCount'] as int?,
    status: json['status'] as String?,
    taskDefinition: json['taskDefinition'] as String?,
    updatedAt: timeStampFromJson(json['updatedAt']),
  );
}