Operation.fromJson constructor

Operation.fromJson(
  1. Map json_
)

Implementation

Operation.fromJson(core.Map json_)
    : this(
        consumerId: json_.containsKey('consumerId')
            ? json_['consumerId'] as core.String
            : null,
        endTime: json_.containsKey('endTime')
            ? json_['endTime'] as core.String
            : null,
        importance: json_.containsKey('importance')
            ? json_['importance'] as core.String
            : null,
        labels: json_.containsKey('labels')
            ? (json_['labels'] as core.Map<core.String, core.dynamic>).map(
                (key, value) => core.MapEntry(
                  key,
                  value as core.String,
                ),
              )
            : null,
        logEntries: json_.containsKey('logEntries')
            ? (json_['logEntries'] as core.List)
                .map((value) => LogEntry.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        metricValueSets: json_.containsKey('metricValueSets')
            ? (json_['metricValueSets'] as core.List)
                .map((value) => MetricValueSet.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        operationId: json_.containsKey('operationId')
            ? json_['operationId'] as core.String
            : null,
        operationName: json_.containsKey('operationName')
            ? json_['operationName'] as core.String
            : null,
        quotaProperties: json_.containsKey('quotaProperties')
            ? QuotaProperties.fromJson(json_['quotaProperties']
                as core.Map<core.String, core.dynamic>)
            : null,
        resources: json_.containsKey('resources')
            ? (json_['resources'] as core.List)
                .map((value) => ResourceInfo.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        startTime: json_.containsKey('startTime')
            ? json_['startTime'] as core.String
            : null,
        traceSpans: json_.containsKey('traceSpans')
            ? (json_['traceSpans'] as core.List)
                .map((value) => TraceSpan.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        userLabels: json_.containsKey('userLabels')
            ? (json_['userLabels'] as core.Map<core.String, core.dynamic>)
                .map(
                (key, value) => core.MapEntry(
                  key,
                  value as core.String,
                ),
              )
            : null,
      );