AllocationResourceStatusSpecificSkuallocation.fromJson constructor

AllocationResourceStatusSpecificSkuallocation.fromJson(
  1. Object? j
)

Implementation

factory AllocationResourceStatusSpecificSkuallocation.fromJson(Object? j) {
  final json = j as Map<String, Object?>;
  return AllocationResourceStatusSpecificSkuallocation(
    sourceInstanceTemplateId: switch (json['sourceInstanceTemplateId']) {
      null => null,
      Object $1 => decodeString($1),
    },
    utilizations: switch (json['utilizations']) {
      null => {},
      Map<String, Object?> $1 => {
        for (final e in $1.entries) decodeString(e.key): decodeInt64(e.value),
      },
      _ => throw const FormatException('"utilizations" is not an object'),
    },
  );
}