NodeGroupNode.fromJson constructor

NodeGroupNode.fromJson(
  1. Map json_
)

Implementation

NodeGroupNode.fromJson(core.Map json_)
    : this(
        accelerators: json_.containsKey('accelerators')
            ? (json_['accelerators'] as core.List)
                .map((value) => AcceleratorConfig.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        consumedResources: json_.containsKey('consumedResources')
            ? InstanceConsumptionInfo.fromJson(json_['consumedResources']
                as core.Map<core.String, core.dynamic>)
            : null,
        cpuOvercommitType: json_.containsKey('cpuOvercommitType')
            ? json_['cpuOvercommitType'] as core.String
            : null,
        disks: json_.containsKey('disks')
            ? (json_['disks'] as core.List)
                .map((value) => LocalDisk.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        instanceConsumptionData: json_.containsKey('instanceConsumptionData')
            ? (json_['instanceConsumptionData'] as core.List)
                .map((value) => InstanceConsumptionData.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        instances: json_.containsKey('instances')
            ? (json_['instances'] as core.List)
                .map((value) => value as core.String)
                .toList()
            : null,
        name: json_.containsKey('name') ? json_['name'] as core.String : null,
        nodeType: json_.containsKey('nodeType')
            ? json_['nodeType'] as core.String
            : null,
        satisfiesPzs: json_.containsKey('satisfiesPzs')
            ? json_['satisfiesPzs'] as core.bool
            : null,
        serverBinding: json_.containsKey('serverBinding')
            ? ServerBinding.fromJson(
                json_['serverBinding'] as core.Map<core.String, core.dynamic>)
            : null,
        serverId: json_.containsKey('serverId')
            ? json_['serverId'] as core.String
            : null,
        status: json_.containsKey('status')
            ? json_['status'] as core.String
            : null,
        totalResources: json_.containsKey('totalResources')
            ? InstanceConsumptionInfo.fromJson(json_['totalResources']
                as core.Map<core.String, core.dynamic>)
            : null,
        upcomingMaintenance: json_.containsKey('upcomingMaintenance')
            ? UpcomingMaintenance.fromJson(json_['upcomingMaintenance']
                as core.Map<core.String, core.dynamic>)
            : null,
      );