Snapshot.fromJson constructor

Snapshot.fromJson(
  1. Map json_
)

Implementation

Snapshot.fromJson(core.Map json_)
    : this(
        architecture: json_.containsKey('architecture')
            ? json_['architecture'] as core.String
            : null,
        autoCreated: json_.containsKey('autoCreated')
            ? json_['autoCreated'] as core.bool
            : null,
        chainName: json_.containsKey('chainName')
            ? json_['chainName'] as core.String
            : null,
        creationSizeBytes: json_.containsKey('creationSizeBytes')
            ? json_['creationSizeBytes'] as core.String
            : null,
        creationTimestamp: json_.containsKey('creationTimestamp')
            ? json_['creationTimestamp'] as core.String
            : null,
        description: json_.containsKey('description')
            ? json_['description'] as core.String
            : null,
        diskSizeGb: json_.containsKey('diskSizeGb')
            ? json_['diskSizeGb'] as core.String
            : null,
        downloadBytes: json_.containsKey('downloadBytes')
            ? json_['downloadBytes'] as core.String
            : null,
        enableConfidentialCompute:
            json_.containsKey('enableConfidentialCompute')
                ? json_['enableConfidentialCompute'] as core.bool
                : null,
        guestOsFeatures: json_.containsKey('guestOsFeatures')
            ? (json_['guestOsFeatures'] as core.List)
                .map((value) => GuestOsFeature.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        id: json_.containsKey('id') ? json_['id'] 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,
        licenseCodes: json_.containsKey('licenseCodes')
            ? (json_['licenseCodes'] as core.List)
                .map((value) => value as core.String)
                .toList()
            : null,
        licenses: json_.containsKey('licenses')
            ? (json_['licenses'] as core.List)
                .map((value) => value as core.String)
                .toList()
            : null,
        locationHint: json_.containsKey('locationHint')
            ? json_['locationHint'] as core.String
            : null,
        name: json_.containsKey('name') ? json_['name'] as core.String : null,
        satisfiesPzi: json_.containsKey('satisfiesPzi')
            ? json_['satisfiesPzi'] as core.bool
            : null,
        satisfiesPzs: json_.containsKey('satisfiesPzs')
            ? json_['satisfiesPzs'] as core.bool
            : null,
        selfLink: json_.containsKey('selfLink')
            ? json_['selfLink'] as core.String
            : null,
        snapshotEncryptionKey: json_.containsKey('snapshotEncryptionKey')
            ? CustomerEncryptionKey.fromJson(json_['snapshotEncryptionKey']
                as core.Map<core.String, core.dynamic>)
            : null,
        snapshotType: json_.containsKey('snapshotType')
            ? json_['snapshotType'] as core.String
            : null,
        sourceDisk: json_.containsKey('sourceDisk')
            ? json_['sourceDisk'] as core.String
            : null,
        sourceDiskEncryptionKey: json_.containsKey('sourceDiskEncryptionKey')
            ? CustomerEncryptionKey.fromJson(json_['sourceDiskEncryptionKey']
                as core.Map<core.String, core.dynamic>)
            : null,
        sourceDiskForRecoveryCheckpoint:
            json_.containsKey('sourceDiskForRecoveryCheckpoint')
                ? json_['sourceDiskForRecoveryCheckpoint'] as core.String
                : null,
        sourceDiskId: json_.containsKey('sourceDiskId')
            ? json_['sourceDiskId'] as core.String
            : null,
        sourceInstantSnapshot: json_.containsKey('sourceInstantSnapshot')
            ? json_['sourceInstantSnapshot'] as core.String
            : null,
        sourceInstantSnapshotEncryptionKey:
            json_.containsKey('sourceInstantSnapshotEncryptionKey')
                ? CustomerEncryptionKey.fromJson(
                    json_['sourceInstantSnapshotEncryptionKey']
                        as core.Map<core.String, core.dynamic>)
                : null,
        sourceInstantSnapshotId: json_.containsKey('sourceInstantSnapshotId')
            ? json_['sourceInstantSnapshotId'] as core.String
            : null,
        sourceSnapshotSchedulePolicy:
            json_.containsKey('sourceSnapshotSchedulePolicy')
                ? json_['sourceSnapshotSchedulePolicy'] as core.String
                : null,
        sourceSnapshotSchedulePolicyId:
            json_.containsKey('sourceSnapshotSchedulePolicyId')
                ? json_['sourceSnapshotSchedulePolicyId'] as core.String
                : null,
        status: json_.containsKey('status')
            ? json_['status'] as core.String
            : null,
        storageBytes: json_.containsKey('storageBytes')
            ? json_['storageBytes'] as core.String
            : null,
        storageBytesStatus: json_.containsKey('storageBytesStatus')
            ? json_['storageBytesStatus'] as core.String
            : null,
        storageLocations: json_.containsKey('storageLocations')
            ? (json_['storageLocations'] as core.List)
                .map((value) => value as core.String)
                .toList()
            : null,
      );