Job.fromJson constructor

Job.fromJson(
  1. Map _json
)

Implementation

Job.fromJson(core.Map _json)
    : this(
        clientRequestId: _json.containsKey('clientRequestId')
            ? _json['clientRequestId'] as core.String
            : null,
        createTime: _json.containsKey('createTime')
            ? _json['createTime'] as core.String
            : null,
        createdFromSnapshotId: _json.containsKey('createdFromSnapshotId')
            ? _json['createdFromSnapshotId'] as core.String
            : null,
        currentState: _json.containsKey('currentState')
            ? _json['currentState'] as core.String
            : null,
        currentStateTime: _json.containsKey('currentStateTime')
            ? _json['currentStateTime'] as core.String
            : null,
        environment: _json.containsKey('environment')
            ? Environment.fromJson(
                _json['environment'] as core.Map<core.String, core.dynamic>)
            : null,
        executionInfo: _json.containsKey('executionInfo')
            ? JobExecutionInfo.fromJson(
                _json['executionInfo'] as core.Map<core.String, core.dynamic>)
            : null,
        id: _json.containsKey('id') ? _json['id'] as core.String : null,
        jobMetadata: _json.containsKey('jobMetadata')
            ? JobMetadata.fromJson(
                _json['jobMetadata'] as core.Map<core.String, core.dynamic>)
            : null,
        labels: _json.containsKey('labels')
            ? (_json['labels'] as core.Map<core.String, core.dynamic>).map(
                (key, item) => core.MapEntry(
                  key,
                  item as core.String,
                ),
              )
            : null,
        location: _json.containsKey('location')
            ? _json['location'] as core.String
            : null,
        name: _json.containsKey('name') ? _json['name'] as core.String : null,
        pipelineDescription: _json.containsKey('pipelineDescription')
            ? PipelineDescription.fromJson(_json['pipelineDescription']
                as core.Map<core.String, core.dynamic>)
            : null,
        projectId: _json.containsKey('projectId')
            ? _json['projectId'] as core.String
            : null,
        replaceJobId: _json.containsKey('replaceJobId')
            ? _json['replaceJobId'] as core.String
            : null,
        replacedByJobId: _json.containsKey('replacedByJobId')
            ? _json['replacedByJobId'] as core.String
            : null,
        requestedState: _json.containsKey('requestedState')
            ? _json['requestedState'] as core.String
            : null,
        satisfiesPzs: _json.containsKey('satisfiesPzs')
            ? _json['satisfiesPzs'] as core.bool
            : null,
        stageStates: _json.containsKey('stageStates')
            ? (_json['stageStates'] as core.List)
                .map<ExecutionStageState>((value) =>
                    ExecutionStageState.fromJson(
                        value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        startTime: _json.containsKey('startTime')
            ? _json['startTime'] as core.String
            : null,
        steps: _json.containsKey('steps')
            ? (_json['steps'] as core.List)
                .map<Step>((value) => Step.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        stepsLocation: _json.containsKey('stepsLocation')
            ? _json['stepsLocation'] as core.String
            : null,
        tempFiles: _json.containsKey('tempFiles')
            ? (_json['tempFiles'] as core.List)
                .map<core.String>((value) => value as core.String)
                .toList()
            : null,
        transformNameMapping: _json.containsKey('transformNameMapping')
            ? (_json['transformNameMapping']
                    as core.Map<core.String, core.dynamic>)
                .map(
                (key, item) => core.MapEntry(
                  key,
                  item as core.String,
                ),
              )
            : null,
        type: _json.containsKey('type') ? _json['type'] as core.String : null,
      );