InstancesStartWithEncryptionKeyRequest.fromJson constructor

InstancesStartWithEncryptionKeyRequest.fromJson(
  1. Object? j
)

Implementation

factory InstancesStartWithEncryptionKeyRequest.fromJson(Object? j) {
  final json = j as Map<String, Object?>;
  return InstancesStartWithEncryptionKeyRequest(
    disks: switch (json['disks']) {
      null => [],
      List<Object?> $1 => [
        for (final i in $1) CustomerEncryptionKeyProtectedDisk.fromJson(i),
      ],
      _ => throw const FormatException('"disks" is not a list'),
    },
  );
}