FleetAttributes.fromJson constructor
FleetAttributes.fromJson(
- Map<String, dynamic> json
)
Implementation
factory FleetAttributes.fromJson(Map<String, dynamic> json) {
return FleetAttributes(
buildArn: json['BuildArn'] as String?,
buildId: json['BuildId'] as String?,
certificateConfiguration: json['CertificateConfiguration'] != null
? CertificateConfiguration.fromJson(
json['CertificateConfiguration'] as Map<String, dynamic>)
: null,
creationTime: timeStampFromJson(json['CreationTime']),
description: json['Description'] as String?,
fleetArn: json['FleetArn'] as String?,
fleetId: json['FleetId'] as String?,
fleetType: (json['FleetType'] as String?)?.toFleetType(),
instanceRoleArn: json['InstanceRoleArn'] as String?,
instanceType: (json['InstanceType'] as String?)?.toEC2InstanceType(),
logPaths: (json['LogPaths'] as List?)
?.whereNotNull()
.map((e) => e as String)
.toList(),
metricGroups: (json['MetricGroups'] as List?)
?.whereNotNull()
.map((e) => e as String)
.toList(),
name: json['Name'] as String?,
newGameSessionProtectionPolicy:
(json['NewGameSessionProtectionPolicy'] as String?)
?.toProtectionPolicy(),
operatingSystem:
(json['OperatingSystem'] as String?)?.toOperatingSystem(),
resourceCreationLimitPolicy: json['ResourceCreationLimitPolicy'] != null
? ResourceCreationLimitPolicy.fromJson(
json['ResourceCreationLimitPolicy'] as Map<String, dynamic>)
: null,
scriptArn: json['ScriptArn'] as String?,
scriptId: json['ScriptId'] as String?,
serverLaunchParameters: json['ServerLaunchParameters'] as String?,
serverLaunchPath: json['ServerLaunchPath'] as String?,
status: (json['Status'] as String?)?.toFleetStatus(),
stoppedActions: (json['StoppedActions'] as List?)
?.whereNotNull()
.map((e) => (e as String).toFleetAction())
.toList(),
terminationTime: timeStampFromJson(json['TerminationTime']),
);
}