Fleet.fromJson constructor

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

Implementation

factory Fleet.fromJson(Map<String, dynamic> json) {
  return Fleet(
    arn: json['Arn'] as String,
    computeCapacityStatus: ComputeCapacityStatus.fromJson(
        json['ComputeCapacityStatus'] as Map<String, dynamic>),
    instanceType: json['InstanceType'] as String,
    name: json['Name'] as String,
    state: (json['State'] as String).toFleetState(),
    createdTime: timeStampFromJson(json['CreatedTime']),
    description: json['Description'] as String?,
    disconnectTimeoutInSeconds: json['DisconnectTimeoutInSeconds'] as int?,
    displayName: json['DisplayName'] as String?,
    domainJoinInfo: json['DomainJoinInfo'] != null
        ? DomainJoinInfo.fromJson(
            json['DomainJoinInfo'] as Map<String, dynamic>)
        : null,
    enableDefaultInternetAccess: json['EnableDefaultInternetAccess'] as bool?,
    fleetErrors: (json['FleetErrors'] as List?)
        ?.whereNotNull()
        .map((e) => FleetError.fromJson(e as Map<String, dynamic>))
        .toList(),
    fleetType: (json['FleetType'] as String?)?.toFleetType(),
    iamRoleArn: json['IamRoleArn'] as String?,
    idleDisconnectTimeoutInSeconds:
        json['IdleDisconnectTimeoutInSeconds'] as int?,
    imageArn: json['ImageArn'] as String?,
    imageName: json['ImageName'] as String?,
    maxUserDurationInSeconds: json['MaxUserDurationInSeconds'] as int?,
    streamView: (json['StreamView'] as String?)?.toStreamView(),
    vpcConfig: json['VpcConfig'] != null
        ? VpcConfig.fromJson(json['VpcConfig'] as Map<String, dynamic>)
        : null,
  );
}