CollectdPayload.fromJson constructor

CollectdPayload.fromJson(
  1. Map json_
)

Implementation

CollectdPayload.fromJson(core.Map json_)
    : this(
        endTime: json_.containsKey('endTime')
            ? json_['endTime'] as core.String
            : null,
        metadata: json_.containsKey('metadata')
            ? (json_['metadata'] as core.Map<core.String, core.dynamic>).map(
                (key, value) => core.MapEntry(
                  key,
                  TypedValue.fromJson(
                      value as core.Map<core.String, core.dynamic>),
                ),
              )
            : null,
        plugin: json_.containsKey('plugin')
            ? json_['plugin'] as core.String
            : null,
        pluginInstance: json_.containsKey('pluginInstance')
            ? json_['pluginInstance'] as core.String
            : null,
        startTime: json_.containsKey('startTime')
            ? json_['startTime'] as core.String
            : null,
        type: json_.containsKey('type') ? json_['type'] as core.String : null,
        typeInstance: json_.containsKey('typeInstance')
            ? json_['typeInstance'] as core.String
            : null,
        values: json_.containsKey('values')
            ? (json_['values'] as core.List)
                .map((value) => CollectdValue.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
      );