Instance.fromJson constructor

Instance.fromJson(
  1. Map json_
)

Implementation

Instance.fromJson(core.Map json_)
    : this(
        acceleratorConfig: json_.containsKey('acceleratorConfig')
            ? AcceleratorConfig.fromJson(json_['acceleratorConfig']
                as core.Map<core.String, core.dynamic>)
            : null,
        bootDiskSizeGb: json_.containsKey('bootDiskSizeGb')
            ? json_['bootDiskSizeGb'] as core.String
            : null,
        bootDiskType: json_.containsKey('bootDiskType')
            ? json_['bootDiskType'] as core.String
            : null,
        canIpForward: json_.containsKey('canIpForward')
            ? json_['canIpForward'] as core.bool
            : null,
        containerImage: json_.containsKey('containerImage')
            ? ContainerImage.fromJson(json_['containerImage']
                as core.Map<core.String, core.dynamic>)
            : null,
        createTime: json_.containsKey('createTime')
            ? json_['createTime'] as core.String
            : null,
        creator: json_.containsKey('creator')
            ? json_['creator'] as core.String
            : null,
        customGpuDriverPath: json_.containsKey('customGpuDriverPath')
            ? json_['customGpuDriverPath'] as core.String
            : null,
        dataDiskSizeGb: json_.containsKey('dataDiskSizeGb')
            ? json_['dataDiskSizeGb'] as core.String
            : null,
        dataDiskType: json_.containsKey('dataDiskType')
            ? json_['dataDiskType'] as core.String
            : null,
        diskEncryption: json_.containsKey('diskEncryption')
            ? json_['diskEncryption'] as core.String
            : null,
        disks: json_.containsKey('disks')
            ? (json_['disks'] as core.List)
                .map((value) => Disk.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        installGpuDriver: json_.containsKey('installGpuDriver')
            ? json_['installGpuDriver'] as core.bool
            : null,
        instanceMigrationEligibility:
            json_.containsKey('instanceMigrationEligibility')
                ? InstanceMigrationEligibility.fromJson(
                    json_['instanceMigrationEligibility']
                        as core.Map<core.String, core.dynamic>)
                : null,
        instanceOwners: json_.containsKey('instanceOwners')
            ? (json_['instanceOwners'] as core.List)
                .map((value) => value as core.String)
                .toList()
            : null,
        kmsKey: json_.containsKey('kmsKey')
            ? json_['kmsKey'] as core.String
            : null,
        labels: json_.containsKey('labels')
            ? (json_['labels'] as core.Map<core.String, core.dynamic>).map(
                (key, value) => core.MapEntry(
                  key,
                  value as core.String,
                ),
              )
            : 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,
        migrated: json_.containsKey('migrated')
            ? json_['migrated'] as core.bool
            : null,
        name: json_.containsKey('name') ? json_['name'] as core.String : null,
        network: json_.containsKey('network')
            ? json_['network'] as core.String
            : null,
        nicType: json_.containsKey('nicType')
            ? json_['nicType'] as core.String
            : null,
        noProxyAccess: json_.containsKey('noProxyAccess')
            ? json_['noProxyAccess'] as core.bool
            : null,
        noPublicIp: json_.containsKey('noPublicIp')
            ? json_['noPublicIp'] as core.bool
            : null,
        noRemoveDataDisk: json_.containsKey('noRemoveDataDisk')
            ? json_['noRemoveDataDisk'] as core.bool
            : null,
        postStartupScript: json_.containsKey('postStartupScript')
            ? json_['postStartupScript'] as core.String
            : null,
        proxyUri: json_.containsKey('proxyUri')
            ? json_['proxyUri'] as core.String
            : null,
        reservationAffinity: json_.containsKey('reservationAffinity')
            ? ReservationAffinity.fromJson(json_['reservationAffinity']
                as core.Map<core.String, core.dynamic>)
            : null,
        serviceAccount: json_.containsKey('serviceAccount')
            ? json_['serviceAccount'] as core.String
            : null,
        serviceAccountScopes: json_.containsKey('serviceAccountScopes')
            ? (json_['serviceAccountScopes'] as core.List)
                .map((value) => value as core.String)
                .toList()
            : null,
        shieldedInstanceConfig: json_.containsKey('shieldedInstanceConfig')
            ? ShieldedInstanceConfig.fromJson(json_['shieldedInstanceConfig']
                as core.Map<core.String, core.dynamic>)
            : null,
        state:
            json_.containsKey('state') ? json_['state'] as core.String : null,
        subnet: json_.containsKey('subnet')
            ? json_['subnet'] as core.String
            : null,
        tags: json_.containsKey('tags')
            ? (json_['tags'] as core.List)
                .map((value) => value as core.String)
                .toList()
            : null,
        updateTime: json_.containsKey('updateTime')
            ? json_['updateTime'] as core.String
            : null,
        upgradeHistory: json_.containsKey('upgradeHistory')
            ? (json_['upgradeHistory'] as core.List)
                .map((value) => UpgradeHistoryEntry.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        vmImage: json_.containsKey('vmImage')
            ? VmImage.fromJson(
                json_['vmImage'] as core.Map<core.String, core.dynamic>)
            : null,
      );