RunReportRequest.fromJson constructor

RunReportRequest.fromJson(
  1. Map _json
)

Implementation

RunReportRequest.fromJson(core.Map _json)
    : this(
        cohortSpec: _json.containsKey('cohortSpec')
            ? CohortSpec.fromJson(
                _json['cohortSpec'] as core.Map<core.String, core.dynamic>)
            : null,
        currencyCode: _json.containsKey('currencyCode')
            ? _json['currencyCode'] as core.String
            : null,
        dateRanges: _json.containsKey('dateRanges')
            ? (_json['dateRanges'] as core.List)
                .map<DateRange>((value) => DateRange.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        dimensionFilter: _json.containsKey('dimensionFilter')
            ? FilterExpression.fromJson(_json['dimensionFilter']
                as core.Map<core.String, core.dynamic>)
            : null,
        dimensions: _json.containsKey('dimensions')
            ? (_json['dimensions'] as core.List)
                .map<Dimension>((value) => Dimension.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        keepEmptyRows: _json.containsKey('keepEmptyRows')
            ? _json['keepEmptyRows'] as core.bool
            : null,
        limit:
            _json.containsKey('limit') ? _json['limit'] as core.String : null,
        metricAggregations: _json.containsKey('metricAggregations')
            ? (_json['metricAggregations'] as core.List)
                .map<core.String>((value) => value as core.String)
                .toList()
            : null,
        metricFilter: _json.containsKey('metricFilter')
            ? FilterExpression.fromJson(
                _json['metricFilter'] as core.Map<core.String, core.dynamic>)
            : null,
        metrics: _json.containsKey('metrics')
            ? (_json['metrics'] as core.List)
                .map<Metric>((value) => Metric.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        offset: _json.containsKey('offset')
            ? _json['offset'] as core.String
            : null,
        orderBys: _json.containsKey('orderBys')
            ? (_json['orderBys'] as core.List)
                .map<OrderBy>((value) => OrderBy.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        property: _json.containsKey('property')
            ? _json['property'] as core.String
            : null,
        returnPropertyQuota: _json.containsKey('returnPropertyQuota')
            ? _json['returnPropertyQuota'] as core.bool
            : null,
      );