InstanceProperties.fromJson constructor

InstanceProperties.fromJson(
  1. Map json_
)

Implementation

InstanceProperties.fromJson(core.Map json_)
    : this(
        advancedMachineFeatures: json_.containsKey('advancedMachineFeatures')
            ? AdvancedMachineFeatures.fromJson(
                json_['advancedMachineFeatures']
                    as core.Map<core.String, core.dynamic>)
            : null,
        canIpForward: json_.containsKey('canIpForward')
            ? json_['canIpForward'] as core.bool
            : null,
        confidentialInstanceConfig:
            json_.containsKey('confidentialInstanceConfig')
                ? ConfidentialInstanceConfig.fromJson(
                    json_['confidentialInstanceConfig']
                        as core.Map<core.String, core.dynamic>)
                : null,
        description: json_.containsKey('description')
            ? json_['description'] as core.String
            : null,
        disks: json_.containsKey('disks')
            ? (json_['disks'] as core.List)
                .map((value) => AttachedDisk.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        guestAccelerators: json_.containsKey('guestAccelerators')
            ? (json_['guestAccelerators'] as core.List)
                .map((value) => AcceleratorConfig.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        keyRevocationActionType: json_.containsKey('keyRevocationActionType')
            ? json_['keyRevocationActionType'] 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')
            ? Metadata.fromJson(
                json_['metadata'] as core.Map<core.String, core.dynamic>)
            : null,
        minCpuPlatform: json_.containsKey('minCpuPlatform')
            ? json_['minCpuPlatform'] 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,
        networkPerformanceConfig:
            json_.containsKey('networkPerformanceConfig')
                ? NetworkPerformanceConfig.fromJson(
                    json_['networkPerformanceConfig']
                        as core.Map<core.String, core.dynamic>)
                : null,
        privateIpv6GoogleAccess: json_.containsKey('privateIpv6GoogleAccess')
            ? json_['privateIpv6GoogleAccess'] as core.String
            : null,
        reservationAffinity: json_.containsKey('reservationAffinity')
            ? ReservationAffinity.fromJson(json_['reservationAffinity']
                as core.Map<core.String, core.dynamic>)
            : null,
        resourceManagerTags: json_.containsKey('resourceManagerTags')
            ? (json_['resourceManagerTags']
                    as core.Map<core.String, core.dynamic>)
                .map(
                (key, value) => core.MapEntry(
                  key,
                  value as core.String,
                ),
              )
            : null,
        resourcePolicies: json_.containsKey('resourcePolicies')
            ? (json_['resourcePolicies'] as core.List)
                .map((value) => value as core.String)
                .toList()
            : null,
        scheduling: json_.containsKey('scheduling')
            ? Scheduling.fromJson(
                json_['scheduling'] as core.Map<core.String, core.dynamic>)
            : 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')
            ? Tags.fromJson(
                json_['tags'] as core.Map<core.String, core.dynamic>)
            : null,
      );