GameSessionPlacement.fromJson constructor
GameSessionPlacement.fromJson(
- Map<String, dynamic> json
)
Implementation
factory GameSessionPlacement.fromJson(Map<String, dynamic> json) {
return GameSessionPlacement(
dnsName: json['DnsName'] as String?,
endTime: timeStampFromJson(json['EndTime']),
gameProperties: (json['GameProperties'] as List?)
?.whereNotNull()
.map((e) => GameProperty.fromJson(e as Map<String, dynamic>))
.toList(),
gameSessionArn: json['GameSessionArn'] as String?,
gameSessionData: json['GameSessionData'] as String?,
gameSessionId: json['GameSessionId'] as String?,
gameSessionName: json['GameSessionName'] as String?,
gameSessionQueueName: json['GameSessionQueueName'] as String?,
gameSessionRegion: json['GameSessionRegion'] as String?,
ipAddress: json['IpAddress'] as String?,
matchmakerData: json['MatchmakerData'] as String?,
maximumPlayerSessionCount: json['MaximumPlayerSessionCount'] as int?,
placedPlayerSessions: (json['PlacedPlayerSessions'] as List?)
?.whereNotNull()
.map((e) => PlacedPlayerSession.fromJson(e as Map<String, dynamic>))
.toList(),
placementId: json['PlacementId'] as String?,
playerLatencies: (json['PlayerLatencies'] as List?)
?.whereNotNull()
.map((e) => PlayerLatency.fromJson(e as Map<String, dynamic>))
.toList(),
port: json['Port'] as int?,
startTime: timeStampFromJson(json['StartTime']),
status: (json['Status'] as String?)?.toGameSessionPlacementState(),
);
}