MetricMetadata.fromJson constructor

MetricMetadata.fromJson(
  1. Map _json
)

Implementation

MetricMetadata.fromJson(core.Map _json)
    : this(
        apiName: _json.containsKey('apiName')
            ? _json['apiName'] as core.String
            : null,
        category: _json.containsKey('category')
            ? _json['category'] as core.String
            : null,
        customDefinition: _json.containsKey('customDefinition')
            ? _json['customDefinition'] as core.bool
            : null,
        deprecatedApiNames: _json.containsKey('deprecatedApiNames')
            ? (_json['deprecatedApiNames'] as core.List)
                .map<core.String>((value) => value as core.String)
                .toList()
            : null,
        description: _json.containsKey('description')
            ? _json['description'] as core.String
            : null,
        expression: _json.containsKey('expression')
            ? _json['expression'] as core.String
            : null,
        type: _json.containsKey('type') ? _json['type'] as core.String : null,
        uiName: _json.containsKey('uiName')
            ? _json['uiName'] as core.String
            : null,
      );