GaDataQuery.fromJson constructor

GaDataQuery.fromJson(
  1. Map json_
)

Implementation

GaDataQuery.fromJson(core.Map json_)
    : this(
        dimensions: json_.containsKey('dimensions')
            ? json_['dimensions'] as core.String
            : null,
        endDate: json_.containsKey('end-date')
            ? json_['end-date'] as core.String
            : null,
        filters: json_.containsKey('filters')
            ? json_['filters'] as core.String
            : null,
        ids: json_.containsKey('ids') ? json_['ids'] as core.String : null,
        maxResults: json_.containsKey('max-results')
            ? json_['max-results'] as core.int
            : null,
        metrics: json_.containsKey('metrics')
            ? (json_['metrics'] as core.List)
                .map((value) => value as core.String)
                .toList()
            : null,
        samplingLevel: json_.containsKey('samplingLevel')
            ? json_['samplingLevel'] as core.String
            : null,
        segment: json_.containsKey('segment')
            ? json_['segment'] as core.String
            : null,
        sort: json_.containsKey('sort')
            ? (json_['sort'] as core.List)
                .map((value) => value as core.String)
                .toList()
            : null,
        startDate: json_.containsKey('start-date')
            ? json_['start-date'] as core.String
            : null,
        startIndex: json_.containsKey('start-index')
            ? json_['start-index'] as core.int
            : null,
      );