VmExtensionPolicyLabelSelector.fromJson constructor

VmExtensionPolicyLabelSelector.fromJson(
  1. Object? j
)

Implementation

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