FileSystem.fromJson constructor

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

Implementation

factory FileSystem.fromJson(Map<String, dynamic> json) {
  return FileSystem(
    administrativeActions: (json['AdministrativeActions'] as List?)
        ?.whereNotNull()
        .map((e) => AdministrativeAction.fromJson(e as Map<String, dynamic>))
        .toList(),
    creationTime: timeStampFromJson(json['CreationTime']),
    dNSName: json['DNSName'] as String?,
    failureDetails: json['FailureDetails'] != null
        ? FileSystemFailureDetails.fromJson(
            json['FailureDetails'] as Map<String, dynamic>)
        : null,
    fileSystemId: json['FileSystemId'] as String?,
    fileSystemType: (json['FileSystemType'] as String?)?.toFileSystemType(),
    kmsKeyId: json['KmsKeyId'] as String?,
    lifecycle: (json['Lifecycle'] as String?)?.toFileSystemLifecycle(),
    lustreConfiguration: json['LustreConfiguration'] != null
        ? LustreFileSystemConfiguration.fromJson(
            json['LustreConfiguration'] as Map<String, dynamic>)
        : null,
    networkInterfaceIds: (json['NetworkInterfaceIds'] as List?)
        ?.whereNotNull()
        .map((e) => e as String)
        .toList(),
    ownerId: json['OwnerId'] as String?,
    resourceARN: json['ResourceARN'] as String?,
    storageCapacity: json['StorageCapacity'] as int?,
    storageType: (json['StorageType'] as String?)?.toStorageType(),
    subnetIds: (json['SubnetIds'] as List?)
        ?.whereNotNull()
        .map((e) => e as String)
        .toList(),
    tags: (json['Tags'] as List?)
        ?.whereNotNull()
        .map((e) => Tag.fromJson(e as Map<String, dynamic>))
        .toList(),
    vpcId: json['VpcId'] as String?,
    windowsConfiguration: json['WindowsConfiguration'] != null
        ? WindowsFileSystemConfiguration.fromJson(
            json['WindowsConfiguration'] as Map<String, dynamic>)
        : null,
  );
}