toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final additionalTreatments = this.additionalTreatments;
  final customDeliveryConfiguration = this.customDeliveryConfiguration;
  final description = this.description;
  final holdoutPercent = this.holdoutPercent;
  final hook = this.hook;
  final isPaused = this.isPaused;
  final limits = this.limits;
  final messageConfiguration = this.messageConfiguration;
  final name = this.name;
  final schedule = this.schedule;
  final segmentId = this.segmentId;
  final segmentVersion = this.segmentVersion;
  final templateConfiguration = this.templateConfiguration;
  final treatmentDescription = this.treatmentDescription;
  final treatmentName = this.treatmentName;
  final tags = this.tags;
  return {
    if (additionalTreatments != null)
      'AdditionalTreatments': additionalTreatments,
    if (customDeliveryConfiguration != null)
      'CustomDeliveryConfiguration': customDeliveryConfiguration,
    if (description != null) 'Description': description,
    if (holdoutPercent != null) 'HoldoutPercent': holdoutPercent,
    if (hook != null) 'Hook': hook,
    if (isPaused != null) 'IsPaused': isPaused,
    if (limits != null) 'Limits': limits,
    if (messageConfiguration != null)
      'MessageConfiguration': messageConfiguration,
    if (name != null) 'Name': name,
    if (schedule != null) 'Schedule': schedule,
    if (segmentId != null) 'SegmentId': segmentId,
    if (segmentVersion != null) 'SegmentVersion': segmentVersion,
    if (templateConfiguration != null)
      'TemplateConfiguration': templateConfiguration,
    if (treatmentDescription != null)
      'TreatmentDescription': treatmentDescription,
    if (treatmentName != null) 'TreatmentName': treatmentName,
    if (tags != null) 'tags': tags,
  };
}