NodeConfig.fromJson constructor

NodeConfig.fromJson(
  1. Map json_
)

Implementation

NodeConfig.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,
        advancedMachineFeatures: json_.containsKey('advancedMachineFeatures')
            ? AdvancedMachineFeatures.fromJson(
                json_['advancedMachineFeatures']
                    as core.Map<core.String, core.dynamic>)
            : null,
        bootDiskKmsKey: json_.containsKey('bootDiskKmsKey')
            ? json_['bootDiskKmsKey'] as core.String
            : null,
        confidentialNodes: json_.containsKey('confidentialNodes')
            ? ConfidentialNodes.fromJson(json_['confidentialNodes']
                as core.Map<core.String, core.dynamic>)
            : null,
        containerdConfig: json_.containsKey('containerdConfig')
            ? ContainerdConfig.fromJson(json_['containerdConfig']
                as core.Map<core.String, core.dynamic>)
            : null,
        diskSizeGb: json_.containsKey('diskSizeGb')
            ? json_['diskSizeGb'] as core.int
            : null,
        diskType: json_.containsKey('diskType')
            ? json_['diskType'] as core.String
            : null,
        enableConfidentialStorage:
            json_.containsKey('enableConfidentialStorage')
                ? json_['enableConfidentialStorage'] as core.bool
                : null,
        ephemeralStorageLocalSsdConfig:
            json_.containsKey('ephemeralStorageLocalSsdConfig')
                ? EphemeralStorageLocalSsdConfig.fromJson(
                    json_['ephemeralStorageLocalSsdConfig']
                        as core.Map<core.String, core.dynamic>)
                : null,
        fastSocket: json_.containsKey('fastSocket')
            ? FastSocket.fromJson(
                json_['fastSocket'] as core.Map<core.String, core.dynamic>)
            : null,
        gcfsConfig: json_.containsKey('gcfsConfig')
            ? GcfsConfig.fromJson(
                json_['gcfsConfig'] as core.Map<core.String, core.dynamic>)
            : null,
        gvnic: json_.containsKey('gvnic')
            ? VirtualNIC.fromJson(
                json_['gvnic'] as core.Map<core.String, core.dynamic>)
            : null,
        imageType: json_.containsKey('imageType')
            ? json_['imageType'] as core.String
            : null,
        kubeletConfig: json_.containsKey('kubeletConfig')
            ? NodeKubeletConfig.fromJson(
                json_['kubeletConfig'] as core.Map<core.String, core.dynamic>)
            : 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,
        linuxNodeConfig: json_.containsKey('linuxNodeConfig')
            ? LinuxNodeConfig.fromJson(json_['linuxNodeConfig']
                as core.Map<core.String, core.dynamic>)
            : null,
        localNvmeSsdBlockConfig: json_.containsKey('localNvmeSsdBlockConfig')
            ? LocalNvmeSsdBlockConfig.fromJson(
                json_['localNvmeSsdBlockConfig']
                    as core.Map<core.String, core.dynamic>)
            : null,
        localSsdCount: json_.containsKey('localSsdCount')
            ? json_['localSsdCount'] as core.int
            : null,
        loggingConfig: json_.containsKey('loggingConfig')
            ? NodePoolLoggingConfig.fromJson(
                json_['loggingConfig'] 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,
        minCpuPlatform: json_.containsKey('minCpuPlatform')
            ? json_['minCpuPlatform'] as core.String
            : null,
        nodeGroup: json_.containsKey('nodeGroup')
            ? json_['nodeGroup'] as core.String
            : null,
        oauthScopes: json_.containsKey('oauthScopes')
            ? (json_['oauthScopes'] as core.List)
                .map((value) => value as core.String)
                .toList()
            : null,
        preemptible: json_.containsKey('preemptible')
            ? json_['preemptible'] as core.bool
            : null,
        reservationAffinity: json_.containsKey('reservationAffinity')
            ? ReservationAffinity.fromJson(json_['reservationAffinity']
                as core.Map<core.String, core.dynamic>)
            : null,
        resourceLabels: json_.containsKey('resourceLabels')
            ? (json_['resourceLabels'] as core.Map<core.String, core.dynamic>)
                .map(
                (key, value) => core.MapEntry(
                  key,
                  value as core.String,
                ),
              )
            : null,
        resourceManagerTags: json_.containsKey('resourceManagerTags')
            ? ResourceManagerTags.fromJson(json_['resourceManagerTags']
                as core.Map<core.String, core.dynamic>)
            : null,
        sandboxConfig: json_.containsKey('sandboxConfig')
            ? SandboxConfig.fromJson(
                json_['sandboxConfig'] as core.Map<core.String, core.dynamic>)
            : null,
        secondaryBootDiskUpdateStrategy:
            json_.containsKey('secondaryBootDiskUpdateStrategy')
                ? SecondaryBootDiskUpdateStrategy.fromJson(
                    json_['secondaryBootDiskUpdateStrategy']
                        as core.Map<core.String, core.dynamic>)
                : null,
        secondaryBootDisks: json_.containsKey('secondaryBootDisks')
            ? (json_['secondaryBootDisks'] as core.List)
                .map((value) => SecondaryBootDisk.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        serviceAccount: json_.containsKey('serviceAccount')
            ? json_['serviceAccount'] as core.String
            : null,
        shieldedInstanceConfig: json_.containsKey('shieldedInstanceConfig')
            ? ShieldedInstanceConfig.fromJson(json_['shieldedInstanceConfig']
                as core.Map<core.String, core.dynamic>)
            : null,
        soleTenantConfig: json_.containsKey('soleTenantConfig')
            ? SoleTenantConfig.fromJson(json_['soleTenantConfig']
                as core.Map<core.String, core.dynamic>)
            : null,
        spot: json_.containsKey('spot') ? json_['spot'] as core.bool : null,
        tags: json_.containsKey('tags')
            ? (json_['tags'] as core.List)
                .map((value) => value as core.String)
                .toList()
            : null,
        taints: json_.containsKey('taints')
            ? (json_['taints'] as core.List)
                .map((value) => NodeTaint.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        windowsNodeConfig: json_.containsKey('windowsNodeConfig')
            ? WindowsNodeConfig.fromJson(json_['windowsNodeConfig']
                as core.Map<core.String, core.dynamic>)
            : null,
        workloadMetadataConfig: json_.containsKey('workloadMetadataConfig')
            ? WorkloadMetadataConfig.fromJson(json_['workloadMetadataConfig']
                as core.Map<core.String, core.dynamic>)
            : null,
      );