Instance.fromJson constructor

Instance.fromJson(
  1. Map json_
)

Implementation

Instance.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,
        cpuPlatform: json_.containsKey('cpuPlatform')
            ? json_['cpuPlatform'] as core.String
            : null,
        creationTimestamp: json_.containsKey('creationTimestamp')
            ? json_['creationTimestamp'] as core.String
            : null,
        deletionProtection: json_.containsKey('deletionProtection')
            ? json_['deletionProtection'] as core.bool
            : 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,
        displayDevice: json_.containsKey('displayDevice')
            ? DisplayDevice.fromJson(
                json_['displayDevice'] as core.Map<core.String, core.dynamic>)
            : null,
        fingerprint: json_.containsKey('fingerprint')
            ? json_['fingerprint'] as core.String
            : null,
        guestAccelerators: json_.containsKey('guestAccelerators')
            ? (json_['guestAccelerators'] as core.List)
                .map((value) => AcceleratorConfig.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        hostname: json_.containsKey('hostname')
            ? json_['hostname'] as core.String
            : null,
        id: json_.containsKey('id') ? json_['id'] as core.String : null,
        instanceEncryptionKey: json_.containsKey('instanceEncryptionKey')
            ? CustomerEncryptionKey.fromJson(json_['instanceEncryptionKey']
                as core.Map<core.String, core.dynamic>)
            : null,
        keyRevocationActionType: json_.containsKey('keyRevocationActionType')
            ? json_['keyRevocationActionType'] as core.String
            : null,
        kind: json_.containsKey('kind') ? json_['kind'] as core.String : null,
        labelFingerprint: json_.containsKey('labelFingerprint')
            ? json_['labelFingerprint'] 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,
        lastStartTimestamp: json_.containsKey('lastStartTimestamp')
            ? json_['lastStartTimestamp'] as core.String
            : null,
        lastStopTimestamp: json_.containsKey('lastStopTimestamp')
            ? json_['lastStopTimestamp'] as core.String
            : null,
        lastSuspendedTimestamp: json_.containsKey('lastSuspendedTimestamp')
            ? json_['lastSuspendedTimestamp'] 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,
        name: json_.containsKey('name') ? json_['name'] 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,
        params: json_.containsKey('params')
            ? InstanceParams.fromJson(
                json_['params'] 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,
        resourcePolicies: json_.containsKey('resourcePolicies')
            ? (json_['resourcePolicies'] as core.List)
                .map((value) => value as core.String)
                .toList()
            : null,
        resourceStatus: json_.containsKey('resourceStatus')
            ? ResourceStatus.fromJson(json_['resourceStatus']
                as core.Map<core.String, core.dynamic>)
            : null,
        satisfiesPzi: json_.containsKey('satisfiesPzi')
            ? json_['satisfiesPzi'] as core.bool
            : null,
        satisfiesPzs: json_.containsKey('satisfiesPzs')
            ? json_['satisfiesPzs'] as core.bool
            : null,
        scheduling: json_.containsKey('scheduling')
            ? Scheduling.fromJson(
                json_['scheduling'] as core.Map<core.String, core.dynamic>)
            : null,
        selfLink: json_.containsKey('selfLink')
            ? json_['selfLink'] as core.String
            : 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,
        shieldedInstanceIntegrityPolicy:
            json_.containsKey('shieldedInstanceIntegrityPolicy')
                ? ShieldedInstanceIntegrityPolicy.fromJson(
                    json_['shieldedInstanceIntegrityPolicy']
                        as core.Map<core.String, core.dynamic>)
                : null,
        sourceMachineImage: json_.containsKey('sourceMachineImage')
            ? json_['sourceMachineImage'] as core.String
            : null,
        sourceMachineImageEncryptionKey:
            json_.containsKey('sourceMachineImageEncryptionKey')
                ? CustomerEncryptionKey.fromJson(
                    json_['sourceMachineImageEncryptionKey']
                        as core.Map<core.String, core.dynamic>)
                : null,
        startRestricted: json_.containsKey('startRestricted')
            ? json_['startRestricted'] as core.bool
            : null,
        status: json_.containsKey('status')
            ? json_['status'] as core.String
            : null,
        statusMessage: json_.containsKey('statusMessage')
            ? json_['statusMessage'] as core.String
            : null,
        tags: json_.containsKey('tags')
            ? Tags.fromJson(
                json_['tags'] as core.Map<core.String, core.dynamic>)
            : null,
        zone: json_.containsKey('zone') ? json_['zone'] as core.String : null,
      );