GceSetup.fromJson constructor

GceSetup.fromJson(
  1. Map json_
)

Implementation

GceSetup.fromJson(core.Map json_)
    : this(
        acceleratorConfigs: json_.containsKey('acceleratorConfigs')
            ? (json_['acceleratorConfigs'] as core.List)
                .map((value) => AcceleratorConfig.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        bootDisk: json_.containsKey('bootDisk')
            ? BootDisk.fromJson(
                json_['bootDisk'] as core.Map<core.String, core.dynamic>)
            : null,
        containerImage: json_.containsKey('containerImage')
            ? ContainerImage.fromJson(json_['containerImage']
                as core.Map<core.String, core.dynamic>)
            : null,
        dataDisks: json_.containsKey('dataDisks')
            ? (json_['dataDisks'] as core.List)
                .map((value) => DataDisk.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        disablePublicIp: json_.containsKey('disablePublicIp')
            ? json_['disablePublicIp'] as core.bool
            : null,
        enableIpForwarding: json_.containsKey('enableIpForwarding')
            ? json_['enableIpForwarding'] as core.bool
            : null,
        gpuDriverConfig: json_.containsKey('gpuDriverConfig')
            ? GPUDriverConfig.fromJson(json_['gpuDriverConfig']
                as core.Map<core.String, core.dynamic>)
            : null,
        machineType: json_.containsKey('machineType')
            ? json_['machineType'] as core.String
            : null,
        metadata: json_.containsKey('metadata')
            ? (json_['metadata'] as core.Map<core.String, core.dynamic>).map(
                (key, value) => core.MapEntry(
                  key,
                  value as core.String,
                ),
              )
            : null,
        networkInterfaces: json_.containsKey('networkInterfaces')
            ? (json_['networkInterfaces'] as core.List)
                .map((value) => NetworkInterface.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        serviceAccounts: json_.containsKey('serviceAccounts')
            ? (json_['serviceAccounts'] as core.List)
                .map((value) => ServiceAccount.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        shieldedInstanceConfig: json_.containsKey('shieldedInstanceConfig')
            ? ShieldedInstanceConfig.fromJson(json_['shieldedInstanceConfig']
                as core.Map<core.String, core.dynamic>)
            : null,
        tags: json_.containsKey('tags')
            ? (json_['tags'] as core.List)
                .map((value) => value as core.String)
                .toList()
            : null,
        vmImage: json_.containsKey('vmImage')
            ? VmImage.fromJson(
                json_['vmImage'] as core.Map<core.String, core.dynamic>)
            : null,
      );