DevicePool.fromJson constructor

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

Implementation

factory DevicePool.fromJson(Map<String, dynamic> json) {
  return DevicePool(
    arn: json['arn'] as String?,
    description: json['description'] as String?,
    maxDevices: json['maxDevices'] as int?,
    name: json['name'] as String?,
    rules: (json['rules'] as List?)
        ?.whereNotNull()
        .map((e) => Rule.fromJson(e as Map<String, dynamic>))
        .toList(),
    type: (json['type'] as String?)?.toDevicePoolType(),
  );
}