Step.fromJson constructor

Step.fromJson(
  1. Map _json
)

Implementation

Step.fromJson(core.Map _json)
    : this(
        completionTime: _json.containsKey('completionTime')
            ? Timestamp.fromJson(_json['completionTime']
                as core.Map<core.String, core.dynamic>)
            : null,
        creationTime: _json.containsKey('creationTime')
            ? Timestamp.fromJson(
                _json['creationTime'] as core.Map<core.String, core.dynamic>)
            : null,
        description: _json.containsKey('description')
            ? _json['description'] as core.String
            : null,
        deviceUsageDuration: _json.containsKey('deviceUsageDuration')
            ? Duration.fromJson(_json['deviceUsageDuration']
                as core.Map<core.String, core.dynamic>)
            : null,
        dimensionValue: _json.containsKey('dimensionValue')
            ? (_json['dimensionValue'] as core.List)
                .map<StepDimensionValueEntry>((value) =>
                    StepDimensionValueEntry.fromJson(
                        value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        hasImages: _json.containsKey('hasImages')
            ? _json['hasImages'] as core.bool
            : null,
        labels: _json.containsKey('labels')
            ? (_json['labels'] as core.List)
                .map<StepLabelsEntry>((value) => StepLabelsEntry.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        multiStep: _json.containsKey('multiStep')
            ? MultiStep.fromJson(
                _json['multiStep'] as core.Map<core.String, core.dynamic>)
            : null,
        name: _json.containsKey('name') ? _json['name'] as core.String : null,
        outcome: _json.containsKey('outcome')
            ? Outcome.fromJson(
                _json['outcome'] as core.Map<core.String, core.dynamic>)
            : null,
        runDuration: _json.containsKey('runDuration')
            ? Duration.fromJson(
                _json['runDuration'] as core.Map<core.String, core.dynamic>)
            : null,
        state:
            _json.containsKey('state') ? _json['state'] as core.String : null,
        stepId: _json.containsKey('stepId')
            ? _json['stepId'] as core.String
            : null,
        testExecutionStep: _json.containsKey('testExecutionStep')
            ? TestExecutionStep.fromJson(_json['testExecutionStep']
                as core.Map<core.String, core.dynamic>)
            : null,
        toolExecutionStep: _json.containsKey('toolExecutionStep')
            ? ToolExecutionStep.fromJson(_json['toolExecutionStep']
                as core.Map<core.String, core.dynamic>)
            : null,
      );