Resources.fromJson constructor

Resources.fromJson(
  1. Map json_
)

Implementation

Resources.fromJson(core.Map json_)
    : this(
        cpu: json_.containsKey('cpu')
            ? (json_['cpu'] as core.num).toDouble()
            : null,
        diskGb: json_.containsKey('diskGb')
            ? (json_['diskGb'] as core.num).toDouble()
            : null,
        kmsKeyReference: json_.containsKey('kmsKeyReference')
            ? json_['kmsKeyReference'] as core.String
            : null,
        memoryGb: json_.containsKey('memoryGb')
            ? (json_['memoryGb'] as core.num).toDouble()
            : null,
        volumes: json_.containsKey('volumes')
            ? (json_['volumes'] as core.List)
                .map((value) => Volume.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
      );