SourceInstanceProperties.fromJson constructor

SourceInstanceProperties.fromJson(
  1. Map json_
)

Implementation

SourceInstanceProperties.fromJson(core.Map json_)
    : this(
        canIpForward: json_.containsKey('canIpForward')
            ? json_['canIpForward'] as core.bool
            : 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) => SavedAttachedDisk.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,
        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,
        tags: json_.containsKey('tags')
            ? Tags.fromJson(
                json_['tags'] as core.Map<core.String, core.dynamic>)
            : null,
      );