ComputationBasedMetricSpec.fromJson constructor

ComputationBasedMetricSpec.fromJson(
  1. Object? j
)

Implementation

factory ComputationBasedMetricSpec.fromJson(Object? j) {
  final json = j as Map<String, Object?>;
  return ComputationBasedMetricSpec(
    type: switch (json['type']) {
      null => null,
      Object $1 =>
        ComputationBasedMetricSpec_ComputationBasedMetricType.fromJson($1),
    },
    parameters: switch (json['parameters']) {
      null => null,
      Object $1 => protobuf.Struct.fromJson($1),
    },
  );
}