CounterUpdate.fromJson constructor

CounterUpdate.fromJson(
  1. Map _json
)

Implementation

CounterUpdate.fromJson(core.Map _json)
    : this(
        boolean: _json.containsKey('boolean')
            ? _json['boolean'] as core.bool
            : null,
        cumulative: _json.containsKey('cumulative')
            ? _json['cumulative'] as core.bool
            : null,
        distribution: _json.containsKey('distribution')
            ? DistributionUpdate.fromJson(
                _json['distribution'] as core.Map<core.String, core.dynamic>)
            : null,
        floatingPoint: _json.containsKey('floatingPoint')
            ? (_json['floatingPoint'] as core.num).toDouble()
            : null,
        floatingPointList: _json.containsKey('floatingPointList')
            ? FloatingPointList.fromJson(_json['floatingPointList']
                as core.Map<core.String, core.dynamic>)
            : null,
        floatingPointMean: _json.containsKey('floatingPointMean')
            ? FloatingPointMean.fromJson(_json['floatingPointMean']
                as core.Map<core.String, core.dynamic>)
            : null,
        integer: _json.containsKey('integer')
            ? SplitInt64.fromJson(
                _json['integer'] as core.Map<core.String, core.dynamic>)
            : null,
        integerGauge: _json.containsKey('integerGauge')
            ? IntegerGauge.fromJson(
                _json['integerGauge'] as core.Map<core.String, core.dynamic>)
            : null,
        integerList: _json.containsKey('integerList')
            ? IntegerList.fromJson(
                _json['integerList'] as core.Map<core.String, core.dynamic>)
            : null,
        integerMean: _json.containsKey('integerMean')
            ? IntegerMean.fromJson(
                _json['integerMean'] as core.Map<core.String, core.dynamic>)
            : null,
        internal: _json.containsKey('internal') ? _json['internal'] : null,
        nameAndKind: _json.containsKey('nameAndKind')
            ? NameAndKind.fromJson(
                _json['nameAndKind'] as core.Map<core.String, core.dynamic>)
            : null,
        shortId: _json.containsKey('shortId')
            ? _json['shortId'] as core.String
            : null,
        stringList: _json.containsKey('stringList')
            ? StringList.fromJson(
                _json['stringList'] as core.Map<core.String, core.dynamic>)
            : null,
        structuredNameAndMetadata:
            _json.containsKey('structuredNameAndMetadata')
                ? CounterStructuredNameAndMetadata.fromJson(
                    _json['structuredNameAndMetadata']
                        as core.Map<core.String, core.dynamic>)
                : null,
      );