toJson method

Map<String, dynamic> toJson()

Implementation

core.Map<core.String, core.dynamic> toJson() => {
      if (accountId != null) 'accountId': accountId!,
      if (advertiserId != null) 'advertiserId': advertiserId!,
      if (audienceAgeGroup != null) 'audienceAgeGroup': audienceAgeGroup!,
      if (audienceGender != null) 'audienceGender': audienceGender!,
      if (budget != null) 'budget': budget!,
      if (clientBillingCode != null) 'clientBillingCode': clientBillingCode!,
      if (clientName != null) 'clientName': clientName!,
      if (endDate != null)
        'endDate':
            "${endDate!.year.toString().padLeft(4, '0')}-${endDate!.month.toString().padLeft(2, '0')}-${endDate!.day.toString().padLeft(2, '0')}",
      if (id != null) 'id': id!,
      if (kind != null) 'kind': kind!,
      if (lastModifiedInfo != null) 'lastModifiedInfo': lastModifiedInfo!,
      if (name != null) 'name': name!,
      if (overview != null) 'overview': overview!,
      if (startDate != null)
        'startDate':
            "${startDate!.year.toString().padLeft(4, '0')}-${startDate!.month.toString().padLeft(2, '0')}-${startDate!.day.toString().padLeft(2, '0')}",
      if (subaccountId != null) 'subaccountId': subaccountId!,
      if (targetClicks != null) 'targetClicks': targetClicks!,
      if (targetConversions != null) 'targetConversions': targetConversions!,
      if (targetCpaNanos != null) 'targetCpaNanos': targetCpaNanos!,
      if (targetCpcNanos != null) 'targetCpcNanos': targetCpcNanos!,
      if (targetCpmActiveViewNanos != null)
        'targetCpmActiveViewNanos': targetCpmActiveViewNanos!,
      if (targetCpmNanos != null) 'targetCpmNanos': targetCpmNanos!,
      if (targetImpressions != null) 'targetImpressions': targetImpressions!,
    };