MetricSource.fromJson constructor

MetricSource.fromJson(
  1. Object? j
)

Implementation

factory MetricSource.fromJson(Object? j) {
  final json = j as Map<String, Object?>;
  return MetricSource(
    metric: switch (json['metric']) {
      null => null,
      Object $1 => Metric.fromJson($1),
    },
    metricResourceName: switch (json['metricResourceName']) {
      null => null,
      Object $1 => decodeString($1),
    },
  );
}