UsageReports.fromJson constructor Null safety

UsageReports.fromJson(
  1. Map _json
)

Implementation

UsageReports.fromJson(core.Map _json)
    : this(
        etag: _json.containsKey('etag') ? _json['etag'] as core.String : null,
        kind: _json.containsKey('kind') ? _json['kind'] as core.String : null,
        nextPageToken: _json.containsKey('nextPageToken')
            ? _json['nextPageToken'] as core.String
            : null,
        usageReports: _json.containsKey('usageReports')
            ? (_json['usageReports'] as core.List)
                .map((value) => UsageReport.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        warnings: _json.containsKey('warnings')
            ? (_json['warnings'] as core.List)
                .map((value) => UsageReportsWarnings.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
      );