QueryResponse.fromJson constructor

QueryResponse.fromJson(
  1. Map json_
)

Implementation

QueryResponse.fromJson(core.Map json_)
    : this(
        cacheHit: json_.containsKey('cacheHit')
            ? json_['cacheHit'] as core.bool
            : null,
        dmlStats: json_.containsKey('dmlStats')
            ? DmlStatistics.fromJson(
                json_['dmlStats'] as core.Map<core.String, core.dynamic>)
            : null,
        errors: json_.containsKey('errors')
            ? (json_['errors'] as core.List)
                .map((value) => ErrorProto.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        jobComplete: json_.containsKey('jobComplete')
            ? json_['jobComplete'] as core.bool
            : null,
        jobCreationReason: json_.containsKey('jobCreationReason')
            ? JobCreationReason.fromJson(json_['jobCreationReason']
                as core.Map<core.String, core.dynamic>)
            : null,
        jobReference: json_.containsKey('jobReference')
            ? JobReference.fromJson(
                json_['jobReference'] as core.Map<core.String, core.dynamic>)
            : null,
        kind: json_.containsKey('kind') ? json_['kind'] as core.String : null,
        numDmlAffectedRows: json_.containsKey('numDmlAffectedRows')
            ? json_['numDmlAffectedRows'] as core.String
            : null,
        pageToken: json_.containsKey('pageToken')
            ? json_['pageToken'] as core.String
            : null,
        queryId: json_.containsKey('queryId')
            ? json_['queryId'] as core.String
            : null,
        rows: json_.containsKey('rows')
            ? (json_['rows'] as core.List)
                .map((value) => TableRow.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        schema: json_.containsKey('schema')
            ? TableSchema.fromJson(
                json_['schema'] as core.Map<core.String, core.dynamic>)
            : null,
        sessionInfo: json_.containsKey('sessionInfo')
            ? SessionInfo.fromJson(
                json_['sessionInfo'] as core.Map<core.String, core.dynamic>)
            : null,
        totalBytesProcessed: json_.containsKey('totalBytesProcessed')
            ? json_['totalBytesProcessed'] as core.String
            : null,
        totalRows: json_.containsKey('totalRows')
            ? json_['totalRows'] as core.String
            : null,
      );